フィルターのクリア

How do i get thindex of the rows where 'NaN' elements are there in a cell array?

3 ビュー (過去 30 日間)
sachin narain
sachin narain 2018 年 6 月 11 日
コメント済み: sachin narain 2018 年 6 月 12 日
I have a cell array with few rows having NAN elements.I want get only the row index where there are NAN elements. I am attaching my cell array along with this question.Kindly help me with this.
Thank you in advance

採用された回答

Paolo
Paolo 2018 年 6 月 11 日
編集済み: Paolo 2018 年 6 月 11 日
Find the rows where NaN occurs, with "a" being your cell array:
[row,~]= find(cell2mat((cellfun(@(x) any(isnan(x)),a,'un',0))))
Find unique rows (eliminate duplicates)
row = unique(row);
For your cell array, output is:
row = [1]

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by