Convert string array to numerical vector
177 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
John Taylor
il 3 Mar 2021
Risposto: Cris LaPierre
il 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 Commenti
Risposta accettata
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Data Type Conversion 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!