[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cell arrays as dynamic field names of structures
From: |
fgnievinski |
Subject: |
Re: cell arrays as dynamic field names of structures |
Date: |
Thu, 19 Dec 2013 07:20:20 -0800 (PST) |
Indeed, in Matlab:
S=struct('f',1);
S.({'f'})
Error: Argument to dynamic structure reference must evaluate to a valid
field name.
Although if your cell is scalar, the following is okay:
fn = {'f'};
S.(fn{:})
ans =
1
--
View this message in context:
http://octave.1599824.n4.nabble.com/cell-arrays-as-dynamic-field-names-of-structures-tp4660237p4660243.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.