[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: plot3 syntax / using a variables
From: |
Martin Helm |
Subject: |
Re: plot3 syntax / using a variables |
Date: |
Sat, 19 Mar 2011 14:55:45 +0100 |
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{:});