Extracting arrays from a structure - different number of array elements
Mostrar comentarios más antiguos
I am having problems extracting arrays from a structure that I created. One of the fields returns a different number of values.
Hypo2 =
1×161 struct array with fields:
datim
otime
file
volctype
lat
lon
dep
mag
>> size( Hypo2 )
ans =
1 161
>> size( [Hypo2.datim] )
ans =
1 161
>> size( [Hypo2.mag] )
ans =
1 160
Hypo2.mag contains numeric values and I'm guessing that there is a NaN in one of them.
How can I extract the arrays so that they are all of the same size? I thought that [] was the way to do it.
I attach a mat file with Hypo2 - there are more fields than I listed above.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Data Type Conversion en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!