Replacing whole row with NaN's if first value is equal to 13 or 15.
3 ビュー (過去 30 日間)
古いコメントを表示
採用された回答
Voss
2022 年 6 月 19 日
Do you mean the value of the first column is equal to 13 or 15?
A = randi(20,10,5)
idx = A(:,1) == 13 | A(:,1) == 15;
A(idx,:) = NaN
Or do you mean replace the whole column if the value of the first row is 13 or 15?
A = randi(20,10,5)
idx = A(1,:) == 13 | A(1,:) == 15;
A(:,idx) = NaN
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で NaNs についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!