フィルターのクリア

How to delete rows from a CELL with certain values?

1 回表示 (過去 30 日間)
Akhil  Reddy
Akhil Reddy 2016 年 6 月 9 日
コメント済み: Jos (10584) 2016 年 6 月 9 日
It has thousands of rows and I want to remove any row with 0 or 99 or 999 in the row 12 and 13

採用された回答

Jos (10584)
Jos (10584) 2016 年 6 月 9 日
Similar question, similar answer ...
You should be able to modify the code from that one!
If you do not understand it, just ask for some more explanation...
  2 件のコメント
Akhil  Reddy
Akhil Reddy 2016 年 6 月 9 日
what if i need to check values from particular column?
Jos (10584)
Jos (10584) 2016 年 6 月 9 日
Fair enough. You can select the columns first:
A_selected = A(:, [ 12 13]) ;
tf = ~any(cellfun(@(x) isequal(x,0) || isequal(x,99),A_selected, 'un',1),2) ;
B = A(tf,:) ;

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

その他の回答 (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