3

I tried to prove the separability of a signal property of 2D Fourier transform using a 2D matrix that's separable to 2 1D vectors. Where:

f(x,y) = f(x)*f(y)

Then F(u,v) = F(u)*F(v)

Using the following code:

% Separabilty of signal 
H = [-1,2,-1;-2,4,-2;-1,2,-1];
b3 = fft2(H)
Hx = [-1,2,-1];
Hy = [1,2,1]';
c2 = fft(Hy)*fft(Hx')'
if norm(vecnorm(b3-c2)) < 1e-5
    "same"
else
    "different"
end

But, though the numbers are correct, their ordering inside the matrix is shifted. I don't understand what's wrong.

Merna Atef
  • 33
  • 3

1 Answers1

4

The error is here

c2 = fft(Hy)*fft(Hx')'

Why do you apply the double transposition fft(Hx')'?

Since

H = Hy*Hx

then

c2 = fft(Hy)*fft(Hx)

Note that in matlab the operation ' performs the complex conjugate transpose, that is the reason why fft(Hx) is not equal to fft(Hx')', since the second transposition changes the sign of the imaginary part.

Alessandro
  • 764
  • 3
  • 8
  • 22
  • Thank you for answering. The 1st transpose is because the fft function only accepts a vector not a row as input. The 2nd is to match the size of the matrices to get a matrix product. I didn't realize that the ' operator also takes the conjugate of the matrix... Is there an operator that only takes transpose? – Merna Atef Dec 20 '20 at 00:35
  • 1
    https://www.mathworks.com/help/matlab/ref/transpose.html – Alessandro Dec 20 '20 at 21:59