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.

답변 (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