Delete rows or column with NaN for a cell array

1 回表示 (過去 30 日間)
Farshid Daryabor
Farshid Daryabor 2020 年 2 月 17 日
回答済み: Pruthvi G 2020 年 3 月 12 日
I really thanks in advance any help. How can I delete NaN's of column from the cell attached as example file here.
Thanks

採用された回答

Bhaskar R
Bhaskar R 2020 年 2 月 17 日
nan_loc = cellfun(@(x)any(isnan(x)), P_QC, 'UniformOutput', false);
for ii=1:length(P_QC)
P_QC{ii}(:,nan_loc{ii}) = [];
end
  4 件のコメント
Bhaskar R
Bhaskar R 2020 年 2 月 17 日
Yeah, same applicable for lon
Farshid Daryabor
Farshid Daryabor 2020 年 2 月 17 日
Thanks

サインインしてコメントする。

その他の回答 (1 件)

Pruthvi G
Pruthvi G 2020 年 3 月 12 日
Data(cellfun(@(cell) any(isnan(cell(:))),Data))={''};

カテゴリ

Help Center および File ExchangeNaNs についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by