Guest User

Untitled

a guest
Jan 17th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. close all;
  2. clc;
  3. file_name = 'W0009.dat';
  4. [lam, I] = read_spectrum(file_name);
  5. lam = lam*1e-3;
  6. figure(1)
  7. plot(lam,I);hold on;
  8.  
  9. M =50;
  10. fs=10000; %Sampling Frequency
  11. f1=0.5/(fs/2); %First Cutoff Frequency
  12. f2=1000/(fs/2);%Second Cutoff Frequency
  13. b = fir1(M,[f1, f2],'bandpass');
  14. I1 = I;
  15. I1 = filter(b, 1, I1); I1(1 : end - floor(M/2)) = I1(floor(M/2) + 1 : end);
  16. I1 = filtfilt(b, 1, I1);
  17. plot(lam,I1);hold on;
Add Comment
Please, Sign In to add comment