[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Naming variables using existing variables....
From: |
Laurent Hoeltgen |
Subject: |
Re: Naming variables using existing variables.... |
Date: |
Mon, 28 Feb 2011 16:32:16 +0100 |
On Mon, 2011-02-28 at 07:18 -0800, bleagos wrote:
> Hey guys,
> I don't know really how to explain my problem but basically I want to use a
> for loop in the following way:
> for i=1:n
> A_i = ....;
> end
>
> so that I will have the variables A_1,A_2,etc...
>
> Is there any way to do this?
> Thanks
>
Hi,
I think the easiet way to achieve this is to use a vector as in
for i=1:n
A(i) = ....;
end
If your n is small, you could still do it by hand with copy and paste,
but I think that would get messy after a while.
Regards,
Laurent.
Re: Solved: Naming variables using existing variables...., bleagos, 2011/02/28