Convert string array to numerical vector
171 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
John Taylor
le 3 Mar 2021
Réponse apportée : Cris LaPierre
le 3 Mar 2021
I have numbers as string array A that I'd like to convert to numerical vector B:
A = ["01";"04";"12"];
B = [1; 4; 12];
I've tried with str2num but it seems to proceed only with string scalars rather than vectors.
Any tips without loop?
0 commentaires
Réponse acceptée
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Data Type Conversion 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!