For loop that replaces string in array to numbers

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

回答(1 个)

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)

此问题已关闭。

产品

标签

关闭:

2021-8-20

Community Treasure Hunt

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

Start Hunting!

Translated by