信号与系统(山东大学张国霞)实验二:信号运算的 MATLAB 实验

一.实验目的

学会运用MATLAB进行信号时移、反折和尺度变换。

学会运用MATLAB进行连续信号微分、积分运算。

学会运用MATLAB进行连续信号相加、相乘运算。

学会运用MATLAB进行连续信号的奇偶分解。

二.实验设备

(1)计算机。

(2)MATLAB软件。

三.实验内容

练习二

1(1)

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
A=3,B=1,C=5
t=-5:0.01:+5
yt=A*t.^2+B*t+C
plot(t,yt)
grid on
axis auto
title('练习二 1(1)')
A=3,B=1,C=5 t=-5:0.01:+5 yt=A*t.^2+B*t+C plot(t,yt) grid on axis auto title('练习二 1(1)')
A=3,B=1,C=5
t=-5:0.01:+5
yt=A*t.^2+B*t+C 
plot(t,yt) 
grid on
axis auto 
title('练习二 1(1)')

1(2)

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
a=5*pi
t=-5:0.01:+5
yt=t.*sin(a*t).*heaviside(t) %定义函数,注意用点乘
plot(t,yt)
grid on
axis auto
title('练习二1(2)')
a=5*pi t=-5:0.01:+5 yt=t.*sin(a*t).*heaviside(t) %定义函数,注意用点乘 plot(t,yt) grid on axis auto title('练习二1(2)')
a=5*pi
t=-5:0.01:+5
yt=t.*sin(a*t).*heaviside(t) %定义函数,注意用点乘
plot(t,yt)
grid on
axis auto
title('练习二1(2)')

1(3)

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
t=-10:0.01:10
ft=exp(-t).*sin(10*pi*t)+exp(-t/2).*sin(9*pi*t)
plot(t,ft)
grid on
axis auto
title('练习二1(3)')
xlabel('t') %x轴标记为t
ylabel('ft')%y轴标记为ft
t=-10:0.01:10 ft=exp(-t).*sin(10*pi*t)+exp(-t/2).*sin(9*pi*t) plot(t,ft) grid on axis auto title('练习二1(3)') xlabel('t') %x轴标记为t ylabel('ft')%y轴标记为ft
t=-10:0.01:10
ft=exp(-t).*sin(10*pi*t)+exp(-t/2).*sin(9*pi*t)
plot(t,ft)
grid on
axis auto
title('练习二1(3)')
xlabel('t') %x轴标记为t				
ylabel('ft')%y轴标记为ft

第二题

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
syms a x %定义符号变量a x
y=x*exp(x)*log(x) %定义函数y
dy=diff(y,'x') %把y对x求一阶导
f=int(y) %对y积分
subplot(2,2,1),ezplot(y),grid on,title('原函数')%生成2x2的图窗,放到第一个,直接画出函数的图形,显示格线,标题为原函数
subplot(2,2,2),ezplot(dy),grid on,title('导数')
subplot(2,2,3),ezplot(f),grid on,title('积分')
axis auto
syms a x %定义符号变量a x y=x*exp(x)*log(x) %定义函数y dy=diff(y,'x') %把y对x求一阶导 f=int(y) %对y积分 subplot(2,2,1),ezplot(y),grid on,title('原函数')%生成2x2的图窗,放到第一个,直接画出函数的图形,显示格线,标题为原函数 subplot(2,2,2),ezplot(dy),grid on,title('导数') subplot(2,2,3),ezplot(f),grid on,title('积分') axis auto
syms a x %定义符号变量a x
y=x*exp(x)*log(x) %定义函数y	
dy=diff(y,'x') %把y对x求一阶导
f=int(y) %对y积分
subplot(2,2,1),ezplot(y),grid on,title('原函数')%生成2x2的图窗,放到第一个,直接画出函数的图形,显示格线,标题为原函数
subplot(2,2,2),ezplot(dy),grid on,title('导数')
subplot(2,2,3),ezplot(f),grid on,title('积分')
axis auto

,实验心得和总结

© 版权声明
THE END
喜欢就支持以下吧
点赞0赞赏 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容