why ifft is complex coefficient?
4 views (last 30 days)
Show older comments
i have to multiply complex number to fft of signal
but the symmetric property is eliminated when complex number is multiply
So the ifft is also complex number
and i do multiply on half of fft
and make symmetric property using filplr and conj
but eventhough i match the symmetric property, the ifft of that frequency spectrum is complex number
code is below
why that happened?
help me
clear all;
close all;
fs = 1000;
ts = 1/ fs;
f = 200;
gain = exp(i*10);
t = 0 : ts : 0.1;
x = sin(2*pi*f*t); % original signal
X = fft(x);
X1 = X(1:51)*gain; %multiply complex number
% X1(1) = 1; %when i do this the coeffcient is real
X2 = fliplr(X1); %make symetric
X3 = [X1 conj(X2)];
X4 = X3(1:end-1);
x4 = ifft(X4);
figure(1)
plot(x4);
X1 = X(1:51)*gain;
X2 = fliplr(X1);
X3 = [X1 conj(X2)];
X4 = X3(1:end-1);
x4 = ifft(X4) % coefficient is complex number
figure(2)
plot(x4);
0 Comments
Answers (1)
Nadia Shaik
on 3 Feb 2022
Hi,
From my understanding you are getting the expected ifft result when the first element of the input is a real number and a different result when the first element is a complex number.
In ifft , the conjugate symmetry holds good from 2nd element to last element of the input. For a real signal, the first element of fft is always real.
So, while computing ifft, the same is expected. The required real signal can be obtained when the first element is a real value.
Hope it helps!
0 Comments
See Also
Categories
Find more on Parametric Spectral Estimation 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!