Created
October 31, 2011 22:23
-
-
Save myw/1329224 to your computer and use it in GitHub Desktop.
Matlab struct examples
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>> j = struct() | |
j = | |
1x1 struct array with no fields. | |
>> j(2).b = 4 | |
j = | |
1x2 struct array with fields: | |
b | |
>> j(3).b = 'FOO'; | |
>> j(4).blarg = 'hottitotti'; | |
>> j | |
j = | |
1x4 struct array with fields: | |
b | |
blarg | |
>> jb = {j.b} | |
jb = | |
[] [4] 'FOO' [] | |
>> jblarg = {j.blarg} | |
jblarg = | |
[] [] [] 'hottitotti' | |
>> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment