0
$\begingroup$

I have a question about using the permutation matrix for performing $iFFT$ for such matrix and then reshape it row-wise and column-wise way.

Let's say that we have a random matrix $x$ whose size is (32,8), so that matrix can be written as below: enter image description here

where $x_k$ represents the column $k$ of matrix $x$ with size of 32 for each column.

$1$- Let's take column wise $iFFT$ for matrix $x$ and then reshape it row-wise resulting matrix $Y$ as below matlab code

x = randn(32,8); 
y = ifft(x); 
Y = reshape(y.',[],1);

$2$- let's manipulate that using another way of permutation matrix. first we can reshape the matrix $x$ column-wise into (256,1) as below:

enter image description here

Then performing $iFFT$ operation with size of $32$-point is corresponding to: enter image description here

$F$ is the Fourier transformation matrix
In order to get the equivalent matrix of Y representing the reshape of $iFFT(x)$ in row-wise, we can multiply the matrix Z with permutation matrix P resulting vector $Y2$ which should be similar to vector $Y$ in case $1$. That can be done by matlab as:

z = reshape(x,[],1);   %
X = kron(eye(8),dftmtx(32)); 
Z = X*z;   

P = zeros(m*n);       %Building the permutation matrix P
col = 1;
for i = 1:m
    for j = 1:n
        E = zeros(m,n);
        E(i,j) = 1;
        P(:,col) = E(:);
        col = col + 1;
    end
end

Y2 = P*Z

So, for $(1)$ and $(2)$, $Y$ should be similar to $Y2$. Is that right? but what I get is different results! My question is that calculation right? why do I get different results ?

$\endgroup$
5
  • $\begingroup$ What is the F matrix? $\endgroup$
    – DSP Novice
    Mar 18, 2020 at 11:05
  • $\begingroup$ @DSPNovice it's fourier matrix gotten in matlab by dftmtx(32); I will add it into the question too. Thank you $\endgroup$
    – Gze
    Mar 18, 2020 at 11:12
  • $\begingroup$ I have added a code in the answer $\endgroup$
    – DSP Novice
    Mar 18, 2020 at 11:34
  • $\begingroup$ @DSPNovice .. Thank you for your answer, but what's about the permutation matrix and reshape the matrix row-wise and column-wise ? $\endgroup$
    – Gze
    Mar 18, 2020 at 11:37
  • $\begingroup$ Can you link the source of this? For code (1), ifft was taken by taking ifft of the individual columns and then stacking them one over the other. For code (2), the same is done but in a matrix form.Instead of applying ifft on individual columns, they are stacked to form one long x column vector and multiplied with a huge I8xF matrix. If you could link the source, I could see what the permutation matrix and row wise multiplication does. Sorry this is all I know $\endgroup$
    – DSP Novice
    Mar 18, 2020 at 11:47

1 Answer 1

1
$\begingroup$

Y and Z should show the same values

clear;
%Create random vector x 
x = randn(32,8); 

%take ifft along each column 
y = ifft(x); 
Y = reshape(y,[],1);

z = reshape(x,[],1);   %
d=conj(dftmtx(32))/32;
X = kron(eye(8),d); 
Z = X*z;
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.