extracted data from array
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
I have aproblem A = [0 5 3 0 0 1 0 2 4 1 1 0 4 0 1]; I want extract (0's and 1's) from A but not all (0's and 1's) I want extract until a certin length I use B = A(A==0|A==1) but in it B = all 0's and1's for example: I want B is extracted until length (B) = 5
0 Commenti
Risposta accettata
Wayne King
il 21 Feb 2012
Why not just do:
A = [0 5 3 0 0 1 0 2 4 1 1 0 4 0 1];
B = A(A==0|A==1);
B = B(1:5);
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Logical 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!