Array slicing scattered rows
2 ビュー (過去 30 日間)
古いコメントを表示
How can I select scattered rows from an array? Suppose
A = rand(6,6)
now how can I select everything except the second and fifth row of A?
0 件のコメント
採用された回答
Ameer Hamza
2020 年 4 月 26 日
You can use setdiff()
A = rand(6,6);
idx = setdiff(1:size(A,1), [2 5]);
B = A(idx, :);
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Scatter Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!