Exclude NaN cells from a cell array
古いコメントを表示
I have a cell array of n number of rows and one column. Each row contains an array.
I want to exclude these NaN cells or copy this cell array in a new one with skipping the NaN cells in the original.

採用された回答
その他の回答 (1 件)
David Hill
2020 年 9 月 6 日
編集済み: David Hill
2020 年 9 月 6 日
c=[];
for k=1:length(yourCell)
if ~isempty(yourCell{k})
c=[c,k];
end
end
newCell=yourCell(c);
カテゴリ
ヘルプ センター および File Exchange で Logical についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!