help-octave
[Top][All Lists]
Advanced

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

Plotting data at end of for loop


From: asha g
Subject: Plotting data at end of for loop
Date: Wed, 9 Aug 2006 21:22:08 -0700 (PDT)

I have a for loop that takes on several values. I
would like it to plot the data at the end of each run
on the same graph. Additionally I would like to put
another plot  on it which is not in the for loop. How
do I do this? I have tried several things including
writing ;

for i= 1: 2 : 10
N = 1*i
statement(1)
.
Q= 
.
.
statement(n)

x= linspace(-1,1,N);
y = Q;
plot (x,y)
hold on 
end 
statement (n1)
W= 
statement (nn)

y1= W;
plot (x,y1,'r')
hold off 

I shd get 5 plots from the first and another from the
y1. I am not getting that. It looks like one from the
first and one from the last. How do I rectify this
situation. Also, how do I make each of the five graphs
in the for loop be colored or linestyled differently ?

Help on this will be appreciated.

Thanks
Asha Gopinathan 




 
   
   
   
  Goals too clearly defined can become blinkers. 
  Mary Catherine Bateson 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


reply via email to

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