How to remove the values in vector 'B' corresponding to 'NaNs' in vector 'A'?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
abdur rauf
le 3 Juin 2018
Commenté : abdur rauf
le 3 Juin 2018
Hello every one, I have two vectors as a sample
A=[10 12 15 NaN 20 30 46 NaN 12 10 NaN 9 8 7 8 NaN 51 Nan 24]
B=[11 73 24 36 47 18 29 31 52 44 33 22 28 16 15 13 19 18 13]
I can delete the 'NaNs' from vector 'A' by using a function
A(isnan(A)) = [];
but I also want to delete the values in vector 'B' corresponding to 'NaNS' in vector 'A'. I want to get
A=[10 12 15 20 30 46 12 10 9 8 7 8 51 24]
B=[11 73 24 47 18 29 52 44 22 28 16 15 19 13]
I do not know how to get it. Any help will be appreciated.
Thanks
0 commentaires
Réponse acceptée
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!