How to Apply IFFT?

3 visualizaciones (últimos 30 días)
Sohel Rana
Sohel Rana el 20 de Mayo de 2021
Comentada: Nagasai Bharat el 24 de Mayo de 2021
Hi,
I have the following code and I did the FFT to convert the signal from wavelength domain to frequency domain? How can I then apply IFFT to get back the individual signal in wavelength domain using the filter coefficents? Please note that I don't want to use filtfilt/fftfilt.
n1=1;
n2=1.444;
data=dlmread('mysignal.txt');
lam=data(:,1);
I=data(:,4);
wave1=2*pi./lam;
I1=fliplr(I);
wave2=linspace(wave1(1),wave1(end),length(lam));
I2=interp1(wave1,I1,wave2);
%FFT
inc=mean(diff(lam));
figure(2)
L=length(I2);
Fs = 1/inc;
Fn = Fs/2;
FTT = (fft(I2)/length(I2));
FvT = linspace(0, 1, fix(numel(FTT)/2)+1)*Fn;
FvT=FvT;
IvT = 1:numel(FvT);
xs=0;xe=3;
plot(FvT,abs(FTT(IvT))*2,'b','linewidth',1);
% Filtering
[pk,loc]=findpeaks(abs(FTT(IvT))*2,FvT,'SortStr','descend');
x1=loc(1);x2=loc(2);x3=loc(3);x4=loc(4);x5=loc(5);
xxx=[x1 x2 x3 x4 x5]
%first signal
dn1=0.005;f1=loc(1)-dn1;f2=loc(1)+dn1;
order1=1;
[b,a] = butter(order1,[f1 f2]/Fn,'bandpass');
%HOW CAN I USE IFFT TO RECONSTRUCT THE FIRST SIGNAL?%
  1 comentario
Nagasai Bharat
Nagasai Bharat el 24 de Mayo de 2021
Hi,
Can you post the code that you have tried to reconstruct your signal?

Iniciar sesión para comentar.

Respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by