Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- close all;
- clc;
- file_name = 'W0009.dat';
- [lam, I] = read_spectrum(file_name);
- lam = lam*1e-3;
- figure(1)
- plot(lam,I);hold on;
- M =50;
- fs=10000; %Sampling Frequency
- f1=0.5/(fs/2); %First Cutoff Frequency
- f2=1000/(fs/2);%Second Cutoff Frequency
- b = fir1(M,[f1, f2],'bandpass');
- I1 = I;
- I1 = filter(b, 1, I1); I1(1 : end - floor(M/2)) = I1(floor(M/2) + 1 : end);
- I1 = filtfilt(b, 1, I1);
- plot(lam,I1);hold on;
Add Comment
Please, Sign In to add comment