From: Chris on
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
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
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
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
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