Home size of struct field from ncinfo
Reply: 0

size of struct field from ncinfo

user918
1#
user918 Published in April 22, 2018, 8:05 pm

I want to get the size of a certain field inside a structure.

For example the size of the field Name inside the field Dimensions of the struct obtained from ncinfo:

finfo = ncinfo('example.nc');
finfo.Dimensions.Name

>>ans =

x


ans =

y


ans =

z

Just using size causes an obvious error:

size(finfo.Dimensions.Name)

Error using size Too many input arguments.

How can I do it in an alternative way?

Also, I would like to save the content of finfo.Dimensions.Name in a separate array or struct. But I get a similar error. For example:

a.b=finfo.Dimensions.Name

returns the error:

Illegal right hand side in assignment. Too many elements.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.324919 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO