Array slicing scattered rows
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
AMIT PAWAR
am 26 Apr. 2020
Beantwortet: Ameer Hamza
am 26 Apr. 2020
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 Kommentare
Akzeptierte Antwort
Ameer Hamza
am 26 Apr. 2020
You can use setdiff()
A = rand(6,6);
idx = setdiff(1:size(A,1), [2 5]);
B = A(idx, :);
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Scatter Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!