SHARE
TWEET

Untitled

poujouly May 28th, 2019 114 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Premier Script NAVTEX
  2. clear;clf;
  3.  
  4. function [num,den]=Pbande2ordNum(Q,Fo,Fe)
  5.     a=1/tan(%pi*Fo/Fe);
  6.     num=[a/Q 0 -a/Q];
  7.     den=[1+a/Q+a^2 2-2*a^2 1-a/Q+a^2];
  8. endfunction
  9.  
  10. // Définition des variables
  11. Fe=44100;Res=1;
  12. Npt=round(Fe/(2*Res));
  13. F1=1615;F2=1785;Q=10;
  14. [num1,den1]=Pbande2ordNum(Q,F1,Fe);
  15. [num2,den2]=Pbande2ordNum(Q,F2,Fe);
  16.  
  17. Fstart=1500;Fstop=1900;
  18. Nstart=round(Fstart/Res);Nstop=round(Fstop/Res);
  19. [H1,fr]=frmag(num1,den1,Npt);
  20. plot(fr(Nstart:Nstop)*Fe,H1(Nstart:Nstop),'r');
  21. [H2,fr]=frmag(num2,den2,Npt);
  22. plot(fr(Nstart:Nstop)*Fe,H2(Nstart:Nstop),'g');
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top