Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Premier Script NAVTEX
- clear;clf;
- function [num,den]=Pbande2ordNum(Q,Fo,Fe)
- a=1/tan(%pi*Fo/Fe);
- num=[a/Q 0 -a/Q];
- den=[1+a/Q+a^2 2-2*a^2 1-a/Q+a^2];
- endfunction
- // Définition des variables
- Fe=44100;Res=1;
- Npt=round(Fe/(2*Res));
- F1=1615;F2=1785;Q=10;
- [num1,den1]=Pbande2ordNum(Q,F1,Fe);
- [num2,den2]=Pbande2ordNum(Q,F2,Fe);
- Fstart=1500;Fstop=1900;
- Nstart=round(Fstart/Res);Nstop=round(Fstop/Res);
- [H1,fr]=frmag(num1,den1,Npt);
- plot(fr(Nstart:Nstop)*Fe,H1(Nstart:Nstop),'r');
- [H2,fr]=frmag(num2,den2,Npt);
- plot(fr(Nstart:Nstop)*Fe,H2(Nstart:Nstop),'g');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement