[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: struct arrays and cs-lists
From: |
Jordi Gutiérrez Hermoso |
Subject: |
Re: struct arrays and cs-lists |
Date: |
Tue, 13 Nov 2012 12:54:09 -0500 |
On 13 November 2012 12:40, Olaf Till <address@hidden> wrote:
> On Tue, Nov 13, 2012 at 09:42:54AM -0500, Jordi Gutiérrez Hermoso wrote:
>> ...
>> The point is that I think struct arrays are best interpreted as cell
>> arrays where one dimension is indexed with strings instead of
>> positive integers. Indeed, the struct2cell and cell2struct functions
>> perform the conversion this way, by changing the way that one
>> dimension is indexed, whether with strings or positive integers. The
>> problem is that there seems to be no way to index struct arrays along
>> their string dimension
>
> If I understand you right --- there is a way, in the struct package:
> fields2cell works as struct2cell but you can specify (a) field(s). But
> you have to permute() the result if you want the original dimensions
> with only one field. If you think its worth I could add a compiled
> function for only one field which preserves the original dimensions.
This sounds nice, but is this really how things would need to be? Are
the cs-lists you get from s.foo just a weird wart in the language?
- Jordi G. H.
- struct arrays and cs-lists, (continued)
- 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, 2012/11/13
- Re: struct arrays and cs-lists, Olaf Till, 2012/11/13
- Re: struct arrays and cs-lists,
Jordi Gutiérrez Hermoso <=
- 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