how to decide a good sampling rate for sampling a function without obvious frequency?

From: lucy (losemind_at_yahoo.com)
Date: 08/16/04


Date: Sun, 15 Aug 2004 18:13:18 -0700

Hi all,

I am having trouble with my sampling problem:

Basically I want to discretize a 2D Gaussian function f=gaussian(x, y)

gaussian(x, y)=1/(2*pi*sigmax*sigmay)*exp(-0.5*(x^2/sigmax^2+y^2/sigmay^2));

In my experiments using Matlab, I am using square grids to deiscretize the
above function.

Suppose I have a grid -- [-N..N, -N..N] where N is the number of samples in
one axis. So all together there are (2N+1)^2 samples.

Suppose the stepsize for discretization is dx.

The support of the discretized function will be [-N*dx..N*dx, -N*dy..N*dy].
Since Gaussian function has an infinite support itself, I have to make N*dx
and N*dy sufficiently large in order to capture most of the energy of the
function f(x, y).

I remember for Gaussian distribution, it should be at least 3*sigma.

So I decide that the following conditions must be satisfied:

N*dx >= 4*sigma_x;
N*dy >= 4*sigma_y;

(sigma_x and sigma_y are known).

If the stepsize is large, the discretization will not be accurate. So dx and
dy should be small compared with sigma_x and sigma_y...

For example, I can choose dx=sigma_x / 100, dy= sigma_y /100,

but then N should be >= 400.

But then

[-N..N, -N..N] grids will have (2N+1)^2 = 801^2=641601 samples...

This is too large and will be very bad for subsequent operations...

After many experiments, I want to ask how to determine a good stepsize
taking into consideration of the storage size, while maintain good accuracy?

I know Nyquist sampling theory, but after many thinking, I found nowhere
here I can apply that theory...

Please help me and give me a hand!

Thank you very much

-Lucy



Relevant Pages