help-octave
[Top][All Lists]
Advanced

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

Function in a Loop output problem


From: dirac
Subject: Function in a Loop output problem
Date: Wed, 8 Sep 2010 07:42:15 -0700 (PDT)

Hi again everyone,

I have yet another problem that I have been stuck on for a few hours now: I
have a loop that calls a function whose output is two vectors.

for i=1:20
  [a,b]=function(variables)
end

I want to use the data [a,b] once the loop has finished and the only way I
thought of this is to make a matrix whose columns are the vectors i.e add a
new column to two matrices wach time the loop goes around...if that makes
sense. a and b are equal in length but different for each iteration of the
loop if that makes sense...

Is there a way to do that? I thought of having two pre defined NaN matrix
with 20 columns so that I can replace each column with a and b each
iteration..

Thanks in advance

Martin

-----
So many functions I don't know about!
-- 
View this message in context: 
http://octave.1599824.n4.nabble.com/Function-in-a-Loop-output-problem-tp2531408p2531408.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

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