How do I delete multiple elements from a column array using a while loop?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
For example if I wanted to delete every element in an array where the array is equal to 0?
0 commentaires
Réponses (1)
Shubham Gupta
le 7 Nov 2019
Modifié(e) : Shubham Gupta
le 7 Nov 2019
This should do the job:
A = [1 0 1 0 1 0 1 0]';
A(A==0) = []
1 commentaire
Voir également
Catégories
En savoir plus sur Loops and Conditional Statements 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!