Skip to content

Instantly share code, notes, and snippets.

@myw
Created September 7, 2011 15:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save myw/1200809 to your computer and use it in GitHub Desktop.
Save myw/1200809 to your computer and use it in GitHub Desktop.
nested structures in Matlab
>> j = struct('expWLS20110910', struct('temp', 1.3, 'current', 2.3))
j =
expWLS20110910: [1x1 struct]
>> j.expWLS20110910.temp
ans =
1.3000
>> j.('expWLS20110910').temp
ans =
1.3000
>> j.('expWLS20110910').('temp')
ans =
1.3000
>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment