find empty fields of structure of pixels of an image

1 Ansicht (letzte 30 Tage)
mandana
mandana am 18 Feb. 2018
Beantwortet: Walter Roberson am 18 Feb. 2018
hi i have a structure that some field have again structure .how can i finde empty fields.i tried
any( structfun(@isempty, clustered_im) )
that resulted this error
Error using structfun
Inputs to STRUCTFUN must be scalar structures.
and i used
[r,c,v]=find(clustered_im==0)
that resulted en error
Undefined function 'eq' for input arguments of type 'struct'
so what do you suggest me to do

Antworten (1)

Walter Roberson
Walter Roberson am 18 Feb. 2018
arrayfun(@(S) any(structfun(@isempty,S)), clustered_im)

Kategorien

Mehr zu Structures finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by