MATLAB: About color of multi curve

about color of multi curve

Hi,
I want to change color of curves automatically
for i=1:3
plot(x,y,'color');hold on;
end
color=b,r,k (blue, red, black) with curve (i=1, 2, 3)
Can you help?

Best Answer

colors = {'b', 'r', 'k'};
for i=1:3
plot(x, y, colors{i});hold on;
end
Related Question