How to find arrays in a cell array
Ältere Kommentare anzeigen
Hi guys,
I have a cell array(let's say c) consisting of 2D arrays and I want to find all the arrays that(say a is an array) have size(a,1)<5 and throw them away of the cell. How can I do that?
Thanks in advance
Akzeptierte Antwort
Weitere Antworten (1)
Faster and simpler than using a function handle:
idx = cellfun('size',c,1)<5;
c(~idx)
Kategorien
Mehr zu Matrices and Arrays finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!