Question

I have no idea how i could explain the problem correctly.

I have a matrix which corresponds to a 2D cartesian system. Now i have to do a Fouriertransformation, but the exp-function doesnt have the form exp(-i(ux+vy)) but exp(-iA(ux+vy). Where A is a constant in the range of 10^15 and my input matrix ranges from 0 to 10.

The exact Formula I want to program is: matrix(u,v) = integral integral matrix(x,y) exp(-iA(ux+vy))dx dy

The only solution I see so far is to use the integral2 Function with a function which expects 2 parameters (x,y) and a handle to u,v. Thanks for the help

Was it helpful?

Solution

If your problem is the A in the exponent you just have to do a variable transformation. Then the integral you have to calculate is

     matrix(u,v) = A^-2 integral integral matrix(x,y) exp(-i(ux+vy))dx dy

Doing this, you then can just use fft2:

    M_uv = A^-2 * fft2(M_xy)

where M_xy is your matrix(x,y) and M_uv then would be the resulting Fourier transform matrix(u,v).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top