Plot graph of different color for different points? Matlab

  • MATLAB
  • Thread starter cks
  • Start date
  • #1
cks
165
0

Main Question or Discussion Point

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
 

Answers and Replies

  • #2
1
0
scatter(1:10,2:11,50,jet(10))
 

Related Threads for: Plot graph of different color for different points? Matlab

Replies
2
Views
698
Replies
2
Views
177
  • Last Post
Replies
1
Views
8K
Replies
4
Views
3K
Replies
2
Views
6K
Replies
1
Views
4K
Replies
1
Views
4K
Top