Monday, September 23, 2013

How to access data in nested structures in matlab

I got a Matlab-File that has data in nested structures. I was wondering, how to access particular fiels by using indices.

I found some information here;
http://www.mathworks.de/de/help/matlab/matlab_prog/access-data-in-nested-structures.html

Finally i found out, that i have to use the curly brackets to access a field in a nested Array.

Example:
imshow(groundTruth{1,1}.Segmentation==3)

(groundTruth itself contains an array of structs)

No comments:

Post a Comment