信号与系统实验MATLAB实验代码.docx

上传人:b****6 文档编号:8155135 上传时间:2023-01-29 格式:DOCX 页数:14 大小:94.14KB
下载 相关 举报
信号与系统实验MATLAB实验代码.docx_第1页
第1页 / 共14页
信号与系统实验MATLAB实验代码.docx_第2页
第2页 / 共14页
信号与系统实验MATLAB实验代码.docx_第3页
第3页 / 共14页
信号与系统实验MATLAB实验代码.docx_第4页
第4页 / 共14页
信号与系统实验MATLAB实验代码.docx_第5页
第5页 / 共14页
点击查看更多>>
下载资源
资源描述

信号与系统实验MATLAB实验代码.docx

《信号与系统实验MATLAB实验代码.docx》由会员分享,可在线阅读,更多相关《信号与系统实验MATLAB实验代码.docx(14页珍藏版)》请在冰豆网上搜索。

信号与系统实验MATLAB实验代码.docx

信号与系统实验MATLAB实验代码

1-1

clearall;

closeall;

t=0:

0.01:

10;

A=1;

a=-0.4;

ft=A*exp(a*t);

plot(t,ft);

1-2

clearall;

closeall;

t=-3:

0.001:

3;

ft=tripuls(t,4,0.5);

plot(t,ft);

ft1=tripuls(t,4,1);

figure,plot(t,ft1);

1-3

clearall;

closeall;

t=0:

0.001:

4;

T=1;

Ft=rectpuls(t-2*T,T);

plot(t,Ft);

1-4

clearall;

closeall;

k=-50:

50;

delta=[zeros(1,50),1,zeros(1,50)];

stem(k,delta);

1-5

clearall;

closeall;

k=-50:

50;

uk=[zeros(1,50),ones(1,51)];

stem(k,uk);

2-1

clearall;

closeall;

t=-3:

0.001:

3;

ft=tripuls(t,4,0.5);

subplot(3,1,1);

plot(t,ft);

title('f(t)');

ft1=tripuls((2*t),4,0.5);

subplot(3,1,2);

plot(t,ft1);

title('f(2t)');

ft2=tripuls((2-2*t),4,0.5);

subplot(3,1,3);

plot(t,ft2);

title('f(2-2t)');

2-2

clearall;

closeall;

h=0.001;

t=-3:

h:

3;

ft=tripuls(t,4,0.5);

subplot(3,1,1);

plot(t,ft);

title('f(t)');

y1=diff(ft)*1/h;

subplot(3,1,2);

plot(t(1:

length(t)-1),y1);

title('thedifferentiationoff(t)');

3-1

clearall;

closeall;

t=-10:

0.01:

10;

A=1;

a=-0.4;

ft=A*exp(a*abs(t));

plot(t,ft);

3-2

clearall;

closeall;

r=0.02;

t=-5:

r:

5;

f1=1/2*exp(-2*t).*stepfun(t,0);

f2=1/2*exp(-2*(t-1)).*stepfun(t-1,0);

ft1=diff(f1)*1/r;

ft2=diff(f2)*1/r;

subplot(3,1,1);

plot(t,f1);

gridon;

xlabel('t');

ylabel('f(t)');

title('f(t)');

subplot(3,1,2);

plot(t(1:

length(t)-1),ft1);

title('diff1');

subplot(3,1,3);

plot(t(1:

length(t)-1),ft2);

title('diff2');

4-1

clearall;

closeall;

symstf;

f=fourier(exp((-2)*abs(t)));

ezplot(f);

4-2

clearall;

closeall;

symstw;

f=ifourier(1/(1+(w^2)),t);

ezplot(f);

ans

1/2*exp(-t)*heaviside(t)+1/2*exp(t)*heaviside(-t)

4-3

clearall;

closeall;

r=0.02;

t=-5:

r:

5;

N=200;

w=2*pi;

k=-N:

N;

w=k*w/N;

f1=1/2*exp(-2*t).*stepfun(t,0);

F=r*f1*exp(-j*t'*w);

F1=abs(F);

P1=angle(F);

subplot(3,1,1);

plot(t,f1);

gridon;

xlabel('t');

ylabel('f(t)');

title('f(t)');

subplot(3,1,2);

plot(w,F1);

xlabel('w');

gridon;

ylabel('F(jw)');

subplot(3,1,3);

plot(w,P1*180/pi);

grid;

xlabel('w');

ylabel('W');

4-4

clearall;

closeall;

R=0.02;

t=-2:

R:

2;

f=stepfun(t,-1)-stepfun(t,1);

f1=f.*exp(-j*5*t);

f2=f.*exp(j*5*t);

W1=pi*5;

N=500;

k=-N:

N;

W=k*W1/N;

F1=f1*exp(-j*t'*W)*R;

F2=f2*exp(-j*t'*W)*R;

F1=real(F1);

F2=real(F2);

subplot(2,1,1);

plot(W,F1);

xlabel('w');

ylabel('F1(jw)');

title('频谱F1(jw)');

subplot(2,1,2);

plot(W,F2);

xlabel('w');

ylabel('F2(jw)');

title('频谱F2(jw)');

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 高等教育 > 工学

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1