I have magnitude and phase of signal in frequency domain and I need to have it in time domain. I know I have to use ifft function, but I heard about mirroring and concatenating these values and I'm kinda lost. I'd appreciate any help with that
I have tried doing something like this, but I'm clearly missing the point
%A - magnitude
z = A .* exp(i*phase);
X = ifft(z);
figure, plot(abs(X))
figure, plot(angle(X))
These are my magnitude and phase in frequency domain

 採用された回答

Star Strider
Star Strider 2020 年 9 月 10 日

1 投票

First, the phase must be in radians, and the highest frequency in both plots must be the Nyquist frequency for any inversion to work.
Then, experiment with this:
Fs = 2*max(frequency_vector)
t = linspace(0, 2*numel(frequency_vector), 2*numel(frequency_vector)).'/Fs; % Time Vector
z = [A(:) .* exp(1i*phase(:)); conj(A(:) .* exp(1i*phase(:)))]; % Force Column Vectors & Concatenate
X = ifft(z);
figure
plot(t, real(X))
There should not be any imaginary values in ‘X’, however they could be present although extremely small, so this would be the approach I would take. Depending upon how ‘z’ was calculated, there could be a scaling issue of numel(t)/2 that it could be necessary to multiply by to recover ‘X’ correctly.
I cannot be certain that this will work with your data, however it should at least get you started.

2 件のコメント

NASRIN AKTER
NASRIN AKTER 2023 年 2 月 18 日
Hello
I have 2 signals and between their frequency spectrum I was expecting for a shift in frequency at maximum amplitude. I got a shift but how do I prove that this frequency shift is not because of a phase shift in time domain? I am attaching an image of the signals.
Thanks in advance
Star Strider
Star Strider 2023 年 2 月 18 日
Please post this as a new Question. It does not actually pertain to this problem, and there is not enuogh information. I will delete it and this Comment in a few hours.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

製品

質問済み:

2020 年 9 月 10 日

コメント済み:

2023 年 2 月 18 日

Community Treasure Hunt

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

Start Hunting!

Translated by