MATLAB Plotting multiple lines with different ledgends/colours on same graph [duplicate]
Possible Duplicate:
Automatically plot different colored lines in MATLAB
I have the following data
X <25x139 double>
t <25x1 double>
names <139x1 cell>
So essentially t is time, and X is a matrix of 139 different samples at each time interval, 开发者_如何学运维where names is an array of each of those sample names.
I want to plot (on the same axis) a range of my samples against time, where each line has
a) A different color
b) A legend name
does this work?
plot(t,X);legend(names);
精彩评论