Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- N=9
- fgc=200+N*50
- fp=900+N*100
- Tp=1/fp
- t=0:Tp:0.1-Tp
- %y=tf([1.43],[1,1.4256,1.5162])
- wga=0.5
- wgc=2*pi*fgc
- A=wga*(tan(wgc*Tp/2))^(-1)
- A1=c+b+1.5162
- A2=2*b-2
- A3=1+b-c
- L=[1.43 2.86 1.43]
- M=[(A*A+14256*A+1.5162),(-2*A*A+2*1.5162),(A*A+1.4256*A+1.5162)]
- z=tf([1.43 2.86 1.43],[(A*A+14256*A+1.5162),(-2*A*A+2*1.5162),(A*A+1.4256*A+1.5162)])
- [h,w]=freqz([1.43 2.86 1.43],[(A*A+14256*A+1.5162),(-2*A*A+2*1.5162),(A*A+1.4256*A+1.5162)])
- subplot(2,1,1)
- plot(w*fp/(2*pi),abs(h))
- subplot(2,1,2)
- semilogy(w*fp/(2*pi),abs(h))
- grid on
- syg=N*sin(2*pi*50*t)+(N/2)*sin(2*pi*(fgc+100)*t);
- sygt=filter(L,M,syg);% przepuścić sygnał przez filtr
- figure;
- plot(t,syg)
- figure;
- plot(t,sygt)
- grid on
- sygf=fft(sygt);
- %zobaczyć jak się zmieni przepust częstotliwości
- % to samo dla filtru 3-rzędu
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement