help-octave
[Top][All Lists]
Advanced

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

Re: Naming variables using existing variables....


From: bleagos
Subject: Re: Naming variables using existing variables....
Date: Mon, 28 Feb 2011 07:41:45 -0800 (PST)

Hey Laurent,

Thanks for replying so quick. The only problem with this is that I want my
input to be matrices of different size depending on the local variable. So
something like this:

for i=1:n
   A_i = rand(i,i);
end

I have been trying do something like:

for i=1:n
    strcat("A",num2str(i)) = rand(i,i);
end

But I have been getting some weird results because octave turns the variable
strcat into a matrix...

Thanks



-- 
View this message in context: 
http://octave.1599824.n4.nabble.com/Naming-variables-using-existing-variables-tp3328092p3328125.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

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