help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: plot3 syntax / using a variables


From: Rick T
Subject: Re: plot3 syntax / using a variables
Date: Sat, 19 Mar 2011 05:02:29 -1000

Thanks that worked perfectly 

Aloha
Rick

On Sat, Mar 19, 2011 at 3:55 AM, Martin Helm <address@hidden> wrote:
Am Samstag, den 19.03.2011, 00:00 -1000 schrieb Rick T:
>
>
> Greetings all
>
>
> I have a plot that works using
> plot3(rotsig(1,:),rotsig(2,:),rotsig(3,:),'b-');
> I would like to change it so I can add several plots
> example:
> p1=rotsig(1,:),rotsig(2,:),rotsig(3,:),'b-';
> plot3(p1);
>
>
> However when I do this I get a different plot and the command window
> starts
> showing my array does anyone know the correct syntax to store plot
> commands in a varable
>
>
> tia sal22
>
Your syntax is wrong, you need to create a cell array with the values by
using curly braces and pass that as comma separated list to the function
which is done with {:}:

p1={rotsig(1,:),rotsig(2,:),rotsig(3,:),'b-'};
plot3(p1{:});







reply via email to

[Prev in Thread] Current Thread [Next in Thread]