how can I do Interpolation 1 to the nearest value of the reference

1 view (last 30 days)
please find attached file, I want interpolate the each column of matrix "h(:,1:89)" corresponding to the reference depth (gdept). I used the following command but the output is not what I expect. I expect to be start first row of each column around 2.5,
pq = interp1(h(:,1:end),gdept);
pq = interp1(h(:,1:end),gdept,'nearst');
pq = interp1(h(:,1:end),gdpt,'linear');
Farshid Daryabor
Farshid Daryabor on 20 Apr 2020
I am trying
pq = griddedInterpolant(h_object,h_refrence,'linear');
Error using griddedInterpolant
The coordinates of the input points must be finite values; Inf and NaN are not permitted.

Sign in to comment.

Answers (0)


Find more on Interpolation in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by