How do I delete multiple elements from a column array using a while loop?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
For example if I wanted to delete every element in an array where the array is equal to 0?
0 Commenti
Risposte (1)
Shubham Gupta
il 7 Nov 2019
Modificato: Shubham Gupta
il 7 Nov 2019
This should do the job:
A = [1 0 1 0 1 0 1 0]';
A(A==0) = []
Vedere anche
Categorie
Scopri di più su Loops and Conditional Statements 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!