I have some data in a form data = {{x,y,f[x,y]},...}
, where f[x,y]
takes only positive values. When I try to interpolate it, Interpolation[data]
, interpolated function has negative values at particular points, like on the plot. Is there some way to interpolate the data with forced condition to take only positive values (not involved InterpolationOrder->0
)?
$\begingroup$
$\endgroup$
-
1$\begingroup$ You could try using a monotonic interpolation method (e.g. Steffen) to compute the gradients in one direction. $\endgroup$ – J. M.'s ennui♦ Sep 24 '18 at 19:07
-
1$\begingroup$ You could take the log of the data, interpolate and then exponentiate. This is guaranteed to be positive, but you will have to judge the fit for yourself. $\endgroup$ – mikado Sep 24 '18 at 19:38