From: Chris on 12 Mar 2010 20:10 I am trying to view my structure array but matlab just returns: str = 1x9 struct array with fields: name boss how can I see the values? Thanks
From: dpb on 12 Mar 2010 20:11 Chris wrote: > I am trying to view my structure array but matlab just returns: > > str = > 1x9 struct array with fields: > name > boss > > how can I see the values? dereference w/ the {} curly brackets --
From: Walter Roberson on 12 Mar 2010 22:59 dpb wrote: > Chris wrote: >> I am trying to view my structure array but matlab just returns: >> >> str = >> 1x9 struct array with fields: >> name >> boss >> >> how can I see the values? > > dereference w/ the {} curly brackets Ummm, no, that won't work on a struct... not unless you use struct2cell, which unfortunately only extracts the values and not the associated field names. At this point, to answer the question, we need to know what output format the original poster wants.
From: dpb on 13 Mar 2010 00:38 Walter Roberson wrote: > dpb wrote: >> Chris wrote: >>> I am trying to view my structure array but matlab just returns: >>> >>> str = >>> 1x9 struct array with fields: >>> name >>> boss >>> >>> how can I see the values? >> >> dereference w/ the {} curly brackets > > Ummm, no, that won't work on a struct... ... Yeah, my bad...was thinking cell, not struct. --
From: Loren Shure on 15 Mar 2010 09:23
In article <hneolt$jaq$1(a)fred.mathworks.com>, ridered300tr(a)hotmail.com says... > I am trying to view my structure array but matlab just returns: > > str = > > 1x9 struct array with fields: > name > boss > > how can I see the values? > Thanks > str.name will show you the list of names -- Loren http://blogs.mathworks.com/loren http://matlabwiki.mathworks.com/MATLAB_FAQ |