MATLAB: How to plot a number of curves on the same plot

for loopplotplotting

want to plot i number of curves on the same X axis and Y axis and label each curve with a number ? how to do this? Thx in Advance

Best Answer

%Example
x=0:0.1:10;
y1=sin(x);
y2=cos(x)
plot(x,y1,'r',x,y2,'g');
legend({'curv1','curv2'})
Look at
doc plot