I have a set of input data which the function interp1 is incorrectly interpolating.
For a statement Vq = interp1(X,V,Xq), I have
The result interp1 gives me is Vq = 3.3864734865877. This is clearly wrong, but may be related to the face that between V = 4 and V =6, X is not monotonically increasing/decreasing. Can someone help me understand why this is failing?