Reconstruction of a Signal from the Real Part of Its Discrete Fourier Transform for matlab

조회 수: 12 (최근 30일)
Hello, good work.
We need Reconstruction of a Signal from the Real Part of Its Discrete Fourier Transform for matlab. Can anyone help?

답변 (2개)

MarKf
MarKf 2023년 3월 1일
N = 14; %ns = 0:N;
xn = 1/2*(randn(N, 1) +1i*randn(N,1)); %random complex signal
x_n = [0+0i;xn;zeros([N,1])+0i]; % M or numel(x_n)=2*N+1
X_k = fft(x_n);
Xr_k = real(X_k);
y_n = ifft(Xr_k*2);
subplot(221),plot(real(xn)), title('real part x(n)')
subplot(222),plot(imag(xn)), title('imag part x(n)')
subplot(223),plot(real(y_n(2:N+1))), title('real RDFT ~y(n)')
subplot(224),plot(imag(y_n(2:N+1))), title('imag RDFT ~y(n)')
  댓글 수: 2
Furkan Seçkiner
Furkan Seçkiner 2023년 3월 2일
Hello sir, thank you for your reply. Is that the answer?
The signals did not change, do I need to do anything else?
Can you recommend any resources on this subject?
MarKf
MarKf 2023년 3월 7일
Sorry for the late reply to this, I just quickly recreated in Matlab the simple formulas in the paper you provided, you can see the variables names and the figures matching. So I thought it did not need a follow up.
You can adapt the code to your needs, if you understand the code and the theory that is, if you need signal processing resources on theory and how it's done in Matlab, or intro to coding, this website offers both (e.g. mathworks.com/help/signal/) but also there's a lot online. Same if you are talking about the slightly more advanced topic of signal reconstruction.
Consider accepting the answer if that's what you were looking for or if it helped.

댓글을 달려면 로그인하십시오.


Star Strider
Star Strider 2023년 3월 1일
No.
You will need the complex part (or equivalently, the phase information) to accurately reconstruct the signal. Otherwise, taking the inverse Fourier transform of only the real part of the Fourier transform will produce something, although not the original signal.

카테고리

Help CenterFile Exchange에서 Signal Attributes and Indexing에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by