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!