The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jul 18th, 2019, 10:55am
Pages: 1
Send Topic Print
dynamic legend syntax (Read 3424 times)
singh
Community Member
***
Offline



Posts: 57

dynamic legend syntax
Jun 14th, 2012, 3:08am
 
Hello,

I have a matlab script in which i need to plot multiple data in  single plot. suppose i have to plot data for 5 vales of i. right now i am hard coding those values inside legend. But i want that script should automatically put legend values each time from 1 till 5. how can i do that? moreover i need to print a term 'mm' in legend everytime eg 1mm,2mm ,3mm,4mm,5mm.

for i = 1 :5
  functionality
 plot(bla bla)
 hold all
 legend('1','2','3','4','5')
end
Back to top
 
 
View Profile   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2019 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.