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!