Finding X value for a corresponding Y value from contents of a table

조회 수: 17(최근 30일)
I'd like to find values from the following table.
0 3.0000 1.0000 1.0000 1.0000 1.0000 1.0000
0.0010 3.0000 1.6532 1.1366 1.0207 1.0025 1.0005
0.0020 3.0000 1.9523 1.3355 1.0915 1.0206 1.0073
0.0030 3.0000 2.1198 1.5034 1.1848 1.0592 1.0289
0.0040 3.0000 2.2283 1.6362 1.2808 1.1137 1.0674
0.0050 3.0000 2.3049 1.7426 1.3723 1.1783 1.1201
0.0060 3.0000 2.3630 1.8301 1.4574 1.2484 1.1825
0.0070 3.0000 2.4097 1.9042 1.5363 1.3208 1.2508
0.0080 3.0000 2.4486 1.9686 1.6099 1.3935 1.3219
0.0090 3.0000 2.4818 2.0259 1.6788 1.4653 1.3937
0.0100 3.0000 2.5109 2.0775 1.7435 1.5355 1.4651
0.0110 3.0000 2.5371 2.1250 1.8047 1.6033 1.5348
0.0120 3.0000 2.5613 2.1691 1.8625 1.6685 1.6023
0.0130 3.0000 2.5835 2.2104 1.9173 1.7312 1.6675
0.0140 3.0000 2.6045 2.2492 1.9694 1.7911 1.7299
0.0150 3.0000 2.6240 2.2859 2.0189 1.8483 1.7898
0.0160 3.0000 2.6424 2.3205 2.0659 1.9030 1.8470
The column on th extreme left is independent quantity(say X) and the other columns contain multiple Y values observed over X. I'd like to find the value of X when Y = 1.5.
For instance, in the third column the value 1.5 doesn't occur. In such a case, I would like to interpolate. Any suggestion on how this can be done?
  댓글 수: 3
Walter Roberson
Walter Roberson 2020년 1월 14일
Raj comments to ananya,
irrelevant to question
I agree with Raj, this does appear to be talking about something else entirely.

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

채택된 답변

Raj
Raj 2020년 1월 13일
You can use 'interp1' command.
For example, in case of third column you can use:
interp1(A(:,4), A(:,1),1.5)
which gives
ans =
0.002979749851102

추가 답변(0개)

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by