Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: plot command changing style and color in for loop
Date: Sun, 25 Oct 2009 11:36:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 32
Message-ID: <hc1d71$kmg$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1256470561 21200 172.30.248.37 (25 Oct 2009 11:36:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 25 Oct 2009 11:36:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2058515
Xref: news.mathworks.com comp.soft-sys.matlab:579870


Hey there,

i'm currently wrting on a few matlab files to evaluate the shape of a hystersis loop. 
So i got 3 m-files. (input, calculation/simulation, plot)

What I want to do: I got a formula depending on 7 parameters. And I want to give out a plot which shows me the change of the hystersis loop when changing one parameter. Therefore i created a for loop which is simulating my simulink model 3 times. Everytime the simulink model picks the changed parameter out of the vector i created.

e.g.
betav=[1, 2, 3]
beta=betav(i)
this way my parameter beta is changed in the simulation
after the simulation, the programm does some calculations with the data comin from the simulation.

now I want to plot that stuff
so I created a vector
color=['b','g','r']
then there is my for loop for the plot

for i=1:3
plot(datax(i,:), datay(i,:), color(i));
end

this works fine
but when i want to have something like this
color=[':b',':g',':r']
matlab ignores my input in the color vector and simply prints it in blue lines
what can I do?
I already tried something like
set(gca,'LineStyleOrder',{'-*','-o','-v','-p','-^','-d'}); 
but then i get no plot at all :/

regards Frank