Below is some part of my data. The 1st column R is the value I got from the experiment, and X Y Z are the coordinates. I am trying to use matlab n-D interpolation function. Matlab said my coordinates are not monotonic increased value. But I cant change or rearrange my coordinates.
Did I use the wrong function?
Please tell me what should I do.
R X Y Z
5.05256e-18 0.016 0.015 0.032
4.99958e-18 0.016 0.015 0.064
5.04485e-18 0.016 0.015 0.128
5.49613e-18 0.016 0.0195 0.032
5.45348e-18 0.016 0.0195 0.064
5.43161e-18 0.016 0.0195 0.128
5.9393e-18 0.016 0.03 0.032
5.98785e-18 0.016 0.03 0.064
6.01929e-18 0.016 0.03 0.128
6.54936e-18 0.016 0.06 0.032
6.45947e-18 0.016 0.06 0.064
6.52379e-18 0.016 0.06 0.128
5.06516e-18 0.032 0.015 0.032
5.04897e-18 0.032 0.015 0.064
5.14022e-18 0.032 0.015 0.128
5.45993e-18 0.032 0.0195 0.032
5.4616e-18 0.032 0.0195 0.064
5.38434e-18 0.032 0.0195 0.128
5.94097e-18 0.032 0.03 0.032
5.91148e-18 0.032 0.03 0.064
6.05671e-18 0.032 0.03 0.128
6.56989e-18 0.032 0.06 0.032
6.58173e-18 0.032 0.06 0.064
6.45971e-18 0.032 0.06 0.128
This is my test code.
I want to get the interpolation value at X=0.06 Y=0.07 Z=0.08
interpn(X,Y,Z,R,0.06,0.07,0.08,'linear')
matlab message: Error using griddedInterpolant The grid vectors are not strictly monotonic increasing.