Array slicing scattered rows
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
AMIT PAWAR
le 26 Avr 2020
Réponse apportée : Ameer Hamza
le 26 Avr 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 commentaires
Réponse acceptée
Ameer Hamza
le 26 Avr 2020
You can use setdiff()
A = rand(6,6);
idx = setdiff(1:size(A,1), [2 5]);
B = A(idx, :);
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Scatter Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!