How do I delete multiple elements from a column array using a while loop?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
For example if I wanted to delete every element in an array where the array is equal to 0?
0 Kommentare
Antworten (1)
Shubham Gupta
am 7 Nov. 2019
Bearbeitet: Shubham Gupta
am 7 Nov. 2019
This should do the job:
A = [1 0 1 0 1 0 1 0]';
A(A==0) = []
1 Kommentar
Siehe auch
Kategorien
Mehr zu Loops and Conditional Statements 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!