Plot graph of different color for different points? Matlab

1 reply · 22K views · last reply
cks
Messages
164
Reaction score
0
I would like to plot a curve with each point with different color.

For example

x0=2;
for i=1:1:200
x1=x0*cos(x0)+exp(x0);
plot(i,x1) (THIS IS THE PLACE WHERE I WANT TO PUT DIFFERENT COLOR)
x0=x1;
end