.专业整理.
.学习帮手.
MATLAB实验报告院系: 专业: 年级: 班号: : 学号:
实验时间: 实验地点:
《信号与系统》
.专业整理.
实验一 连续时间信号的表示及可视化
实验题目:
f(t)??(t);f(t)??(t);f(t)?eat(分别取a?0及a?0); f(t)?R(t);f(t)?Sa(?t);f(t)?Sin(2?ft)(分别画出不同周期个数
的波形)。
解题分析:
以上各类连续函数,先运用t = t1: p:t2的命令定义时间围向量,然后调用对应的函数,建立f与t的关系,最后调用plot()函数绘制图像,并用axis()函数限制其坐标围。
实验程序:
(1)
f(t)??(t)
t=-1:0.01:3 %设定时间变量t的围及步长 f=dirac(t) %调用冲激函数dirac() plot(t,f) %用plot函数绘制连续函数 axis([-1,3,-0.5,1.5]) %用axis函数规定横纵坐标的围 (2)
f(t)??(t)
t=-1:0.01:3 %设定时间变量t的围及步长 f=heaviside(t) %调用阶跃函数heaviside() plot(t,f) %用plot函数绘制连续函数 title('f(t)=heaviside(t)') %用title函数设置图形的名称 axis([-1,3,-0.5,1.5]) %用axis函数规定横纵坐标的围 (3)
f(t)?eat
a=1时:
.学习帮手.
.专业整理.
t=-5:0.01:5 %设定时间变量t的围及步长 f=exp(t) %调用指数函数exp() plot(t,f) %用plot函数绘制连续函数 title('f=exp(t)') %用title函数设置图形的名称 axis([-5,5,-1,100]) %用axis函数规定横纵坐标的围 a=2时: t=-5:0.01:5
f=exp(2*t) %plot(t,f)
title('f=exp(2*t)') axis([-5,5,-1,100]) a=-2时: t=-5:0.01:5 f=exp(-2*t) plot(t,f)
title('f=exp(-2*t)') axis([-5,5,-1,100]) (4)
f(t)?R(t)
t=-5:0.01:5
f=rectpuls(t,2) %心,宽度为a plot(t,f) title('f=R(t)') axis([-5 5 -0.5 1.5]) (5)
f(t)?Sa(?t)
ω=1时: t=-20:0.01:20
f=sin(t)./t %样函数 plot(t,f)
.学习帮手.
调用指数函数exp() 用rectpuls(t,a)表示门函数,默认以零点为中调用正弦函数sin(),并用sin(t)./t实现抽
信号与系统 MATLAB实验报告
![](/skin/haowen/images/icon_star.png)
![](/skin/haowen/images/icon_star.png)
![](/skin/haowen/images/icon_star.png)
![](/skin/haowen/images/icon_star.png)