Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Problem on reading a value from a table

조회 수: 2 (최근 30일)
andrea vironda
andrea vironda 2020년 7월 28일
마감: MATLAB Answer Bot 2021년 8월 20일
Hi!
in a .txt i have this shape:
<rec time="0.000000" f1="-0.000002" f2="0.000987"/>
<rec time="0.004000" f1="-0.000002"/>
<rec time="0.006000" f2="0.000992"/>
<rec time="0.008000" f2="0.000987"/>
<rec time="0.010000" f1="-0.000002"/>
<rec time="0.014000" f1="-0.000002"/>
<rec time="0.018000" f2="0.000992"/>
<rec time="0.020000" f1="-0.000002" f2="0.000987"/>
As you can see "time" is always present, often i have both "f1" and "f2" but sometimes there is only 1.
I've already managed to display datas in f1 and f2 array but i'd need that, if only one between f1 or f2 is present, the missing value must be an average between the f(x-1) and f(x+1).
For example in the second row i have only f1, so f2 would be (9.87e-4+9.92e-4)/2 in his own array.
  댓글 수: 3
andrea vironda
andrea vironda 2020년 7월 28일
I'd associate the time with the present f1 and the missing f2, result of an average.
What do you mean as retime?
dpb
dpb 2020년 7월 28일

답변 (0개)

이 질문은 마감되었습니다.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by