필터 지우기
필터 지우기

string to double conversion

조회 수: 1 (최근 30일)
Somnath Kale
Somnath Kale 2021년 1월 4일
편집: Somnath Kale 2021년 1월 4일
hii all,
i have this series of string and i wanted to convert each comma seperated value into doubles
Current =
'+5.004100E-07,+5.006900E-07,+5.003900E-07,+5.003100E-07,+5.003300E-07,+5.003700E-07,+5.004800E-07,+5.003200E-07,+5.003600E-07,+5.003900E-07'
I tried several ways but using table and text file conversion but unable to do so
can some one please help?
thanks in advance!!
  댓글 수: 1
Somnath Kale
Somnath Kale 2021년 1월 4일
편집: Somnath Kale 2021년 1월 4일
thanks Stephan!!

댓글을 달려면 로그인하십시오.

채택된 답변

Stephen23
Stephen23 2021년 1월 4일
Current = '+5.004100E-07,+5.006900E-07,+5.003900E-07,+5.003100E-07,+5.003300E-07,+5.003700E-07,+5.004800E-07,+5.003200E-07,+5.003600E-07,+5.003900E-07';
V = sscanf(Current,'%f,')
V = 10×1
5.004100000000000e-07 5.006900000000000e-07 5.003900000000000e-07 5.003100000000000e-07 5.003300000000000e-07 5.003700000000000e-07 5.004800000000000e-07 5.003200000000000e-07 5.003600000000000e-07 5.003900000000000e-07

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Characters and Strings에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by