I get the error "Error using griddedInterpolant. The grid vectors must contain unique points"
My script is:
for j = 1:length(time_obs)
T_subsurf_mod(:,j) = interp1(depth_act(:,j),T_ice(:,j),depth_obs(:,j));
T_subsurf_mod and depth_obs are both 11x8784 double and depth_act is a 201x8784 double.
I have tried using the function "unique" on my input but does not work.