I'm having a problem with interpolation from a non-monotonic function.
x=[34,35,36,37,38,39,41,42,43,44,45,46]
y=[0.33 0.166 0.25 0.33 0.5 0.58 0.66 0.66 0.5 0.58 0.8 0.66]
I want to be able to interpolate the X value that corresponds to a Y value of 0.25.
When plotting (x,y) I can see that there are two points that corresponds to a Y value of 0.25, so normal interpolation (using interp1) would not work.
Error: "The grid vectors are not strictly monotonic increasing."
Is there a way to interpolate both points and then calculate their mean, I couldn't find anything that fits my problem.
0.25value i only see one0.25value in theyvector? - Nikos M.