I have data workspace 1x617struc 1 field, every row has 1x1 struc with 4 fields, How can I extract the 4th field of data for 617? thanks

1 visualización (últimos 30 días)
no

Respuesta aceptada

Walter Roberson
Walter Roberson el 10 de Nov. de 2016
{YourStruct.NameOf4thField}
A cell array is needed because the 4th field is not guaranteed to be consistent size or data type.
In the case where the 4th field is a numeric row vector of consistent size, then
vertcat(YourStruct.NameOf4thField)
would give you a 617 x something numeric array
  4 comentarios
Ni Putu Dewi Nurmalasari
Ni Putu Dewi Nurmalasari el 10 de Nov. de 2016
</matlabcentral/answers/uploaded_files/63030/data.jpg> Hi Robert, I cannot quite figure out the code that works. so i post the data i have, the 4th data always has 1 column but the row is changing. Thanks a lot

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Structures en Help Center y File Exchange.

Etiquetas

Aún no se han introducido etiquetas.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by