[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Creating "sequential variable names"
From: |
Ben Abbott |
Subject: |
Re: Creating "sequential variable names" |
Date: |
Mon, 18 Oct 2010 22:00:24 +0800 |
On Oct 18, 2010, at 9:55 PM, AlbFrigerio wrote:
> Thank you so much Andy and Søren, your help was very fast and I got what I
> wanted to.
>
> Søren, you are completely right, but I'm not (yet) so crazy to create 100
> variables instead of using a vector :) . I just proposed an example, I just
> needed to know ho to create sequential names.
>
> Thanks again,
> Alberto
Its not clear what you'd like to do, but ...
If you have a sequence of names stored in a cell array ...
names = {"name1", "name2", "name3" ...};
You can store values associated with each name as a structure. For example ...
s.(names{n}) = values{n)
Ben
- Creating "sequential variable names", AlbFrigerio, 2010/10/18
- Re: Creating "sequential variable names", Andy Buckle, 2010/10/18
- Re: Creating "sequential variable names", Søren Hauberg, 2010/10/18
- Re: Creating "sequential variable names", AlbFrigerio, 2010/10/18
- Re: Creating "sequential variable names",
Ben Abbott <=
- Re: Creating "sequential variable names", Søren Hauberg, 2010/10/18
- Re: Creating "sequential variable names", AlbFrigerio, 2010/10/18
- Re: Creating "sequential variable names", John W. Eaton, 2010/10/18
- Re: Creating "sequential variable names", Sergei Steshenko, 2010/10/18
- Re: Creating "sequential variable names", John W. Eaton, 2010/10/18
- Re: Creating "sequential variable names", AlbFrigerio, 2010/10/19
- Re: Creating "sequential variable names", John W. Eaton, 2010/10/19
- Re: Creating "sequential variable names", AlbFrigerio, 2010/10/19
- Re: Creating "sequential variable names", Jaroslav Hajek, 2010/10/19