how know size of field struct
Show older comments
hi,
Sis is a struct
D is a field of struct
size(Sis.D)
>> size(Sis.D)
Error using size
Accepted Answer
More Answers (1)
the cyclist
on 5 Jun 2023
That command will give an error for some values of Sis.D, and not for others. Regardless, I don't think it will do what you expect. For example, what do you think size(Sis.D) should give for the following struct?
Sis(1).D = [1 2];
Sis(2).D = [1 2 3];
Sis(3).D = [1; 2; 3];
Perhaps you should upload your data, and explain what you are trying to do.
Categories
Find more on Structures in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!