How to convert complex one sided spectrum into time domain
Show older comments
Hi!
I have a one sided spectrum with complex values.I want to convert in back to time domain. As I se, the matlab ifft function converts two sided spectrum into time domain. My qustion is, is there a matlab function that can apply invers fourier transform on one sided spectrum? If there isn't how can I conert a complex one soided spectrum to two sided?
Accepted Answer
More Answers (1)
You specifically mention "complex one sided". Is the implication that the frequency data you have is complex valued but the time domain data is intended to be real-valued? If so then that can be handled without much difficulty. However if the time-domain data is intended to be complex-valued then you do not have enough information to reconstruct it.
Assuming that it is the positive frequencies in the data, and that the first entry in the data is the "0" frequency, then
%build some demonstration data
N = 127;
F0 = 10; %total signal, mean times signal length
F1 = [F0, complex(randn(1,N),randn(1,N)).*exp(-(1:N)./N)];
%F1 is the demonstration one-sided complex frequency-domain signal.
plot(abs(F1)); title('one-sided frequency')
%reconstruct
F2 = [F1, fliplr(conj(F1(2:end)))];
%F2 is the reconstructed two-side complex frequency-domain signal
plot(abs(F2)); title('two-sided reconstructed frequency')
%ifft
td = ifft(F2);
whos td
plot(td); title('time domain')
Categories
Find more on Spectral Measurements 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!

