MATLAB: How to interpolate ‘z’ for one value of ‘x’ but multiple values of y

interpolationMATLAB

I have an array x of size 1×56 An array y of size 1×20 And an array z of size (20×56)
I want to interpolate to find ‘z’ for a specific value of x but multiple y.
I am trying to plot Interp2(x,y,z,1400,y)
Z =f(x,y,z)
But it doesn’t seem to be working right. Anyone have any ideas?

Best Answer

If an interpolation result is giving you NaN, it normally means you are interpolating at a location which is outside the area covered by your points - hence there is no data there to interpolate between.
Related Question