Is signal_matrix equal to signal_matrix2 ? (fftshift problem)
3 views (last 30 days)
Show older comments
signal_matrix2 = fft(fftshift(ifft(fftshift(signal_matrix,1),[],1),1),[],1);
signal_matrix is a Nr*Na matrix. I think signak_matrix2 should be the same as signal_matrix. However, Only by using signal_matrix2 can get the correct result. So I want to know the difference between signal_matrix1 and signal_matrix2.
2 Comments
Paul
on 11 Mar 2023
Hi demin,
Why do should signal_matrix and signal_matrix2 be the same? I mean, if we step through each operation
signa_matrix -> fftshift -> ifft -> fftshift -> fft -> signal_matrix2
and track what's happening at each step, why would they be expected to be the same?
Answers (1)
Aditya Srikar
on 31 Mar 2023
Edited: Aditya Srikar
on 31 Mar 2023
Hey Demin,
The matrices signal_matrix and signal_matrix2 need not be the same.
Because as you perform the series of operations on signal_matrix, the elements would get modified.
Consider the following example
signal_matrix = [1 2;3 4]
% step-1
res1 = fftshift(signal_matrix,1) % res1 = [3 4; 1 2]
% step-2
res2 = ifft(res1,[],1) % res2 = [2 3; 1 1]
%step-3
res3 = fftshift(res2,1) % res3 = [1 1; 2 3]
%step-4 => final answer
signal_matrix2 = fft(res3, [], 1) % signal_matrix2 = [3 4; -1 -2]
We can clearly observe that the matrix is being modified in each step in given series of operations. So we can say that the resultant matrix obtained after performing the operations can be different from the input matrix.
Hope it helps !
0 Comments
See Also
Categories
Find more on Get Started with MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!