removing cells containing Inf or NaNs
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi folks. I have a cell array, each cell containing a column vector. Is there any way to check if a cell contains inf or nans and if so deleting them? I.e if cell{3}=[inf;inf;1;2] then i want to remove it.
Thanks.
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 24 Dez. 2012
YourCellArray( cellfun( @(C) any(isnan(C) | isinf(C)), YourCellArray ) ) = [];
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Cell Arrays finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!