Interpolating 1D Gaussian into 2D Gaussian
- by Drazick
Let's say I have a 1D Gaussian function.
Its length is 600 for that matter.
I want to Interpolate it into 2D Gaussian of the size 600 X 600.
This is the code I wrote (OTFx is the Gaussian Function, OTF - 2d Interpolated Function):
[x, y] = meshgrid([-300:299], [-300:299]);
r = sqrt((x .^ 2) + (y .^ 2));
OTF = interp1([-300:299], OTFx, r(:), 'spline');
OTF = reshape(OTF, [600, 600]);
The problem is I get Overshoot at the end:
How can I prevent it?
Is there better Interpolating algorithm for Monotonic Descending Functions?