why ifft is complex coefficient?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (1)
Nadia Shaik
am 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 Kommentare
Siehe auch
Kategorien
Mehr zu Parametric Spectral Estimation finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!