Array slicing scattered rows

2 ビュー (過去 30 日間)
AMIT PAWAR
AMIT PAWAR 2020 年 4 月 26 日
回答済み: Ameer Hamza 2020 年 4 月 26 日
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?

採用された回答

Ameer Hamza
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 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by