For loop that replaces string in array to numbers
Infos
Cette question est clôturée. Rouvrir pour modifier ou répondre.
Afficher commentaires plus anciens
I need to make a for loop that replaces the numbers in an array from string to a number. example '22.222' to just 22.222
4 commentaires
Stephen23
le 23 Juil 2020
Shawntae Harris
le 23 Juil 2020
Stephen23
le 23 Juil 2020
@hawntae Harris : please save the data in a .mat file and then click the paperclip button to upload it here.
Shawntae Harris
le 23 Juil 2020
Réponses (1)
Harsha Priya Daggubati
le 29 Juil 2020
Modifié(e) : Harsha Priya Daggubati
le 29 Juil 2020
Hi,
Along with '.m' file, it would help if you can share the contents of data or your text file you are trying to read.
I tried this at my end:
a = ["2.222","452.1512","4151.1545","262.154","55.54","653.265"]
double(a)
Cette question est clôturée.
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!