help-octave
[Top][All Lists]
Advanced

[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




reply via email to

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