Prev: Using LAPACK with mex
Next: Please help!
From: coconha on 1 May 2010 03:25 Hi, I have a question for a simple problem. When I plot two horizontal lines ,e.g. plot([1 2],[2 3;2 3]) each line is by default coloured according to the current colormap definition. By default, the first is blue the second is green. I would like to plot 'n' points, e.g. plot(1:n,rand(1,n),'x') and I would like them to be colored according to the colormap as well. I know how to solve this problem using a for loop. But I was wondering if anyone knows how to do this without a for loop?
From: us on 1 May 2010 05:16 "coconha " <aydosc(a)cse.unsw.edu.au> wrote in message <hrgl12$8k7$1(a)fred.mathworks.com>... > Hi, I have a question for a simple problem. > > When I plot two horizontal lines ,e.g. > plot([1 2],[2 3;2 3]) > each line is by default coloured according to the current colormap definition. By default, the first is blue the second is green. > > I would like to plot 'n' points, e.g. > plot(1:n,rand(1,n),'x') > and I would like them to be colored according to the colormap as well. I know how to solve this problem using a for loop. But I was wondering if anyone knows how to do this without a for loop? a hint: help scatter; us
|
Pages: 1 Prev: Using LAPACK with mex Next: Please help! |