How to Apply IFFT?
조회 수: 1 (최근 30일)
이전 댓글 표시
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
Nagasai Bharat
2021년 5월 24일
Hi,
Can you post the code that you have tried to reconstruct your signal?
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Signal Processing Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!