MATLAB绘制图像以及基本运算

1.Sa(t)函数的画法(代码与图如下):

t =-4*pi:0.01:4*pi;
ft=sin(t)./t;
plot(t,ft);

这里写图片描述
2.信号的平移,尺度变换,反褶等

t=-2:0.01:1;
y=1*(t>=(-2) & t<=(0))+(-1*t+1).*(t>(0) & t<=(1));
plot(t,y);
axis([-2 1 -1 2])
t1=t+2;
t2=t/3;
t3=-t;
t4=-(t+2)./3;
subplot(321),plot(t,y),axis([-2 1 -1 2]),xlabel('f(t)');
subplot(322),plot(t1,y),axis([0 3 -1 2]),xlabel('f(t-2)');
subplot(323),plot(t2,y),axis([-1 1 -1 2]),xlabel('f(3t)');
subplot(324),plot(t3,y),axis([-1 2 -1 2]),xlabel('f(-t)');
subplot(325),plot(t4,y),axis([-1 1 -1 2]),xlabel('f(-3t-2)');

这里写图片描述
3.信号运算之求导以及积分

syms  x a;
A=diff(x*sin(x)*log(x),'x',1);
b=int(x.^5-a*x.^2+sqrt(x)./2,'x');
c=int(x*exp(x)./(1+x).^2,'x',0,1);

结果分别为:
A=sin(x) + log(x)*sin(x) + x*cos(x)*log(x)

b=x^(3/2)/3 - (a*x^3)/3 + x^6/6

c=exp(1)/2 - 1
4.信号的卷积之符号运算法:

syms tao;
t=sym('t','positive');
xt1=sym('heaviside(t)-heaviside(t-1)');
xt2=sym('heaviside(t)-heaviside(t-3)');
xt_tao=subs(xt1,t,tao)*subs(xt2,t,t-tao);
yt=int(xt_tao,tao,0,t);
yt=simplify(yt);
ezplot(yt,[0,2]);grid on;

注意:此处是门函数的卷积
这里写图片描述
5.信号卷积之数值求解法:

dt=0.01;
t=0:0.01:5;
n=length(t);
f1=( t>=0 )-( t>=2 );
f2=( t>=0 ) + ( t>=1 )-( t>=2 )-( t>=3 );
f=conv(f1,f2)*dt;
tt=(0:n-1)*dt;
subplot(221),plot(t,f1);
subplot(222),plot(t,f2);
subplot(223),plot(t,f);

这里写图片描述

  • 3
    点赞
  • 38
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

小刘同学要加油呀

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值