[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: struct arrays and cs-lists
From: |
Ben Abbott |
Subject: |
Re: struct arrays and cs-lists |
Date: |
Tue, 13 Nov 2012 11:34:36 -0500 |
On Nov 13, 2012, at 10:28 AM, Jordi Gutiérrez Hermoso wrote:
> On 13 November 2012 10:12, Ben Abbott <address@hidden> wrote:
>>
>> On Nov 13, 2012, at 9:42 AM, Jordi Gutiérrez Hermoso wrote:
>
>>> So how are struct arrays meant to be used?
>>
>> Would supporting an empty index to produce an equivalent cell array be
>> useful ...
>>
>> cellarray = s.()
>
> Sorry, but this doesn't answer my question. If indexing struct arrays
> with field names produces cs-lists, how is this supposed to be used?
> Am I supposed to do "{s.foo}" or "[s.foo]" depending on which one I
> want? What's the point of cs-lists here, what was the intent, or is
> there simply no intent and just a Matlab design bug that we have to
> copy?
>
> - Jordi G. H.
I agree with your point about the poor design (bug?).
It would have been preferred if {s.foo}, {s.("foo")}, or {s(:).foo} produced a
cell-array with the same size as s. And {s.foo}{:} produced a cs-list.
Ben
- struct arrays and cs-lists, Jordi Gutiérrez Hermoso, 2012/11/12
- Re: struct arrays and cs-lists, Daniel J Sebald, 2012/11/12
- struct arrays and cs-lists, John W. Eaton, 2012/11/13
- Re: struct arrays and cs-lists, Jordi Gutiérrez Hermoso, 2012/11/13
- Re: struct arrays and cs-lists, Jordi Gutiérrez Hermoso, 2012/11/13
- Re: struct arrays and cs-lists, Ben Abbott, 2012/11/13
- Re: struct arrays and cs-lists, Jordi Gutiérrez Hermoso, 2012/11/13
- Re: struct arrays and cs-lists, Ben Abbott, 2012/11/13
- Re: struct arrays and cs-lists, Benjamin Abbott, 2012/11/13
- Re: struct arrays and cs-lists, Jordi Gutiérrez Hermoso, 2012/11/13
- Re: struct arrays and cs-lists,
Ben Abbott <=
- Re: struct arrays and cs-lists, Olaf Till, 2012/11/13
- Re: struct arrays and cs-lists, Jordi Gutiérrez Hermoso, 2012/11/13
- Re: struct arrays and cs-lists, John W. Eaton, 2012/11/13
- Re: struct arrays and cs-lists, Olaf Till, 2012/11/13
- Re: struct arrays and cs-lists, Olaf Till, 2012/11/13
- Re: struct arrays and cs-lists, Jordi Gutiérrez Hermoso, 2012/11/13
Re: struct arrays and cs-lists, Ben Abbott, 2012/11/13