To find a value on x axis corresponding to a y value( found by interpolation) in a MATLAB plot
1 回表示 (過去 30 日間)
古いコメントを表示
I have a 57*61 array that has values in each row approximately between 40.21 to 94.34 in percentage. Each row is plotted against other vector of 1*61.
The values change unevenly in each row. Now I have to find two values that are close to 50. For first row they are at (1,6) and (1,7), but they change in each row, so how can I get the two values in each row in immediate proximity of 50. I then plan to use interpolation to find the x value (in the 1*61 vector) corresponding to the y value.
0 件のコメント
採用された回答
Jan
2018 年 3 月 24 日
For each row:
Result = zeros(1, 57);
for iCol = 1:57
Result(iCol) = interp1(Data(iCol, :), y, 50);
end
where y is your 1x61 vector.
But this replies 1 value for each column. Why do you want to find 2 values?
その他の回答 (1 件)
参考
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!