MATLAB: How to find the number of “struct” class in a structure array

classstructstructurevariable

Hi,
Is there a way to determine the number of "struct" names in the structure array?
This way I could elimate the previous non-struct variables created.
Thanks
Ferd

Best Answer

nnz(cellfun(@isstruct, struct2cell(YourStruct)))
Related Question