Info

この質問は閉じられています。 編集または回答するには再度開いてください。

For loop that replaces string in array to numbers

1 回表示 (過去 30 日間)
Shawntae Harris
Shawntae Harris 2020 年 7 月 22 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
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 件のコメント
Stephen23
Stephen23 2020 年 7 月 23 日
@hawntae Harris : please save the data in a .mat file and then click the paperclip button to upload it here.
Shawntae Harris
Shawntae Harris 2020 年 7 月 23 日
here it is

回答 (1 件)

Harsha Priya Daggubati
Harsha Priya Daggubati 2020 年 7 月 29 日
編集済み: Harsha Priya Daggubati 2020 年 7 月 29 日
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)

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by