信号与系统matlab实现1

%取样函数
t1=-10:0.5:10;
f1=sin(t1)./t1;
figure(1)
plot(t1,f1);
%t的取样间隔越小,曲线越光滑
t2=-10:0.1:10;
f2=sin(t2)./t2;
figure(2)
plot(t2,f2);
%使用数学函数
syms t;
f=sin(t)/t;
ezplot(f,[-10,10]);

%单位阶跃函数
%数学函数 heaviside(t)
syms t;
y=heaviside(t);
ezplot(y,[-3,3]);
axis([-4,4,-0.5,1.5])
grid on

%符号函数
syms t;
y=2*heaviside(t)-1;
ezplot(y,[-2 2]);

%虚指数函数
syms t;
y=exp(j*2*t);
ezplot(real(y),[-2,2]);
grid on;
figure
ezplot(imag(y),[-2,2]);
grid on

%正弦函数
syms t;
y=sin(2*t);
ezplot(y,[-2,2]);
grid on;

%余弦函数
syms t;
y=cos(2*t);
ezplot(y,[-2,2]);
grid on;

%辛格函数
syms t;
y=sinc(t);
ezplot(y,[-2,2]);
grid on;

%信号运算的matlab实现
%f1(t)=sin(2Πt),f2=sin(16Πt)画出这两个信号以及两信号相乘的波形图
syms t
f1=sin(2*pi*t);
f2=sin(16*pi*t);
f=f1.*f2;
subplot(311)
ezplot(f1);
subplot(312)
ezplot(f2);
subplot(313)
ezplot(f);

%信号的平移,反折和尺度变换
syms t
f=2*heaviside(t)-heaviside(t-1)-heaviside(t-2);
figure
ezplot(f,[-4 5]);
  • 0
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值