Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

For loop that replaces string in array to numbers

6 Ansichten (letzte 30 Tage)
Shawntae Harris
Shawntae Harris am 22 Jul. 2020
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
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 Kommentare
Stephen23
Stephen23 am 23 Jul. 2020
@hawntae Harris : please save the data in a .mat file and then click the paperclip button to upload it here.

Antworten (1)

Harsha Priya Daggubati
Harsha Priya Daggubati am 29 Jul. 2020
Bearbeitet: Harsha Priya Daggubati am 29 Jul. 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)

Diese Frage ist geschlossen.

Tags

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by