代码搜索结果
找到约 10,000 项符合
Raspberry Pi 的代码
27t.m
Rp=1.5;
Rs=20;
T=0.001;
wp=0.4*pi;
ws=0.6*pi;
wp1=(2/T)*tan(wp/2);
ws1=(2/T)*tan(ws/2);
[n,wn]=buttord(wp1,ws1,Rp,Rs,'s')
[b,a]=butter(n,wn,'s')
[bz,az]=bilinear(b,a,1/T);
[b0,B,A]=dir2par(b
49t.m
N=241;alpha=(N-1)/2;k=0:N-1;wk=(2*pi/N)*k;
f1=50;f2=250;fs=1000;L=40;
Hk=[ones(1,49),zeros(1,144),ones(1,48)];
angH=-alpha*(2*pi)/N*k;
H=Hk.*exp(i*angH);
h=real(ifft(H,N));
[db,mag,pha,grd,w]=fr
31t.m
Rp=1;Rs=50;ws1=0.4*pi;ws2=0.48*pi;fs=1000;
ws3=(2*fs)*tan(ws1/2);ws4=(2*fs)*tan(ws2/2);
n=10;
[z,p,k]=ellipap(n,Rp,Rs);[b,a]=zp2tf(z,p,k);
w0=sqrt(ws3*ws4);bw=ws4-ws3;
[b1,a1]=lp2bs(b,a,w0,bw);
9t.m
clear;
clc;
N1=40;
n=0:1:N1-1;
t=0.01*n;
x=2*sin(4*pi*t)+5*cos(16*pi*t);
x1=fft(x);
magx1=abs(x1);
w=2*pi/N1*n;
subplot(3,1,1);
plot((w*100)/(2*pi),magx1);title('DFT幅度');
axis([0,25,0,20
4t.m
b=[1 1];
a=[1 -0.9 0.81];
[H,w]=freqz(b,a,400,'whole');
magH=abs(H);
phaH=angle(H);
subplot(4,1,1);
plot(w/pi,magH);
title('系统的幅频响应');
subplot(4,1,2);
plot(w/pi,phaH/pi);
title('系统的相频响应');
29t.m
clc;
close all;
clear all;
Rp=1;Rs=40;fs=1000;
ws1=0.25*pi;ws2=0.8*pi;
wp1=0.4*pi;wp2=0.7*pi;
wp3=(2*fs)*tan(wp1/2);
wp4=(2*fs)*tan(wp2/2);
ws3=(2*fs)*tan(ws1/2);
ws4=(2*fs)*tan(ws2/2);
wp=[
3t.m
b=[2];
a=[1 -0.8 -0.5];
subplot(4,1,1);
zplane(b,a);
title('系统的零极图');
[H,w]=freqz(b,a,100,'whole');
magH=abs(H);
phaH=angle(H);
subplot(4,1,2);
plot(w/pi,magH);
title('系统的幅频响应');
subplot(4,
36t.m
clc;clear all;
Rp=3;Rs=30;fp1=100;fp2=250;fs1=50;fs2=300;T=0.001;
wp1=2*pi*fp1*T;wp2=2*pi*fp2*T;
wp3=(2/T)*tan(wp1/2);wp4=(2/T)*tan(wp2/2);
wp=[wp3,wp4];
ws1=2*pi*fs1*T;ws2=2*pi*fs2*T;
ws3=(2/T)
37t.m
clc;clear all;
Rp=3;Rs=30;fp1=50;fp2=300;fs1=100;fs2=250;T=0.001;
wp1=2*pi*fp1*T;wp2=2*pi*fp2*T;
wp3=(2/T)*tan(wp1/2);wp4=(2/T)*tan(wp2/2);
wp=[wp3,wp4];
ws1=2*pi*fs1*T;ws2=2*pi*fs2*T;
ws3=(2/T)
7.2t.m
clear;
clc;
x=[2,2,2,2,2,2,2,2];w=[0:1:500]*2*pi/500;
[H]=freqz(x,1,w);
magH=abs(H);phaH=angle(H);
subplot(2,2,1);plot(w/pi,magH);grid
xlabel('');ylabel('|x|');title('DTFT的幅度')
subplot(2,2,2);p