Path: news.mathworks.com!not-for-mail
From: "Ali Abolhasani" <aliakbar.abolhasani@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Need help with plot3
Date: Sun, 12 Dec 2010 11:53:05 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 23
Message-ID: <ie2d31$1pi$1@fred.mathworks.com>
References: <ie1hnc$5dm$1@fred.mathworks.com> <AkYMo.3804$5U7.3059@newsfe03.iad> <ie25dc$71k$1@fred.mathworks.com> <ie2ao0$pvn$1@fred.mathworks.com>
Reply-To: "Ali Abolhasani" <aliakbar.abolhasani@gmail.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1292154785 1842 172.30.248.37 (12 Dec 2010 11:53:05 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 12 Dec 2010 11:53:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2652413
Xref: news.mathworks.com comp.soft-sys.matlab:694727

"Sadik " <sadik.hava@gmail.com> wrote in message <ie2ao0$pvn$1@fred.mathworks.com>...
> Hello Ali,
> 
> Just as Walter described above, you can something like the following:
> 
> t = 0:pi/200:10*pi;
> x = sin(t);
> y = cos(t);
> z = t;
> N = length(z); % = length(x) = length(y)
> colors = jet(N);
> for k = 1:N
>     plot3(x(k),y(k),z(k),'Color',colors(k,:))
>     hold on
> end
> 
> Best.

Dear Sadik

Thank you very much! It does work goood.

Ali