Array slicing scattered rows
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposta accettata
Ameer Hamza
il 26 Apr 2020
You can use setdiff()
A = rand(6,6);
idx = setdiff(1:size(A,1), [2 5]);
B = A(idx, :);
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Scatter Plots in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!