Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- clear all;
- clc;
- nr_group=1;
- f_gc=200+nr_group*50;
- f_p=900+nr_group*100;
- delta_f=50; %Hz lub 25Hz
- delta_f_25=25;
- N=f_p/delta_f;
- N_25=f_p/delta_f_25;
- H=[exp(-j*(0:4)*pi*((N-1)/N)) zeros(1,11) exp(j*(N-(16:19))*pi*((N-1)/N))];
- H_25=[exp(-j*(0:8)*pi*((N_25-1)/N_25)) zeros(1,23) exp(j*(N_25-(32:39))*pi*((N_25-1)/N_25))];
- h=ifft(H);
- h_25=ifft(H_25);
- figure()
- stem(0:N-1,h)
- print -depsc matalab_wsp_okna_filtru.eps
- figure()
- stem(0:N_25-1,h_25)
- print -depsc matalab_wsp_okna_filtru_25.eps
- L=[h];
- M=1;
- [K,F]=freqz(L,M,512,f_p);
- figure()
- plot(F,abs(K));
- print -depsc matlab_freq.eps
- L_25=[h_25];
- M_25=1;
- [K_25,F_25]=freqz(L_25,M_25,512,f_p);
- figure()
- plot(F_25,abs(K_25));
- print -depsc matlab_freq_25.eps
- figure()
- P=angle(K)*180/pi;
- plot(F, P)
- print -depsc matlab_angle.eps
- figure()
- P_25=angle(K_25)*180/pi;
- plot(F_25, P_25)
- print -depsc matlab_angle_25.eps
- func=ss(L,M);
- [Y, T, F]=step(func,N+5)
- stem(T,Y)
- hold on
- plot(T,Y);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement