필터 지우기
필터 지우기

Please help me.. I want to import two data in string.

조회 수: 1 (최근 30일)
Jeong_evolution
Jeong_evolution 2016년 10월 29일
답변: Walter Roberson 2016년 10월 29일
code is
--------------------------------------------------------------------------------------
Str = [' <data seq="0" <temp8.0</temp <data seq="1" <temp6.9</temp '];
Str(strfind(Str, '>')) = [];
Key_1 = '<temp';
Index_1 = strfind(Str, Key_1);
Value_1 = sscanf(Str(Index_1 + length(Key_1):end),'%f');
--------------------------------------------------------------------------------------
In workspace, Value_1 = 8.0.
But I want to express Value_2 = 6.9
Use for... etc function
Finally,
In workspace,
I want to express
-------------------
Value_1 = 8.0
Value_2 = 6.9
.
.
.
value_n = x.x
-------------------

채택된 답변

Walter Roberson
Walter Roberson 2016년 10월 29일

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 File Operations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by