谢谢,已经解决这个问题了.以下是我写的一个周期信号加 一个冲击振动,感觉写的很很麻烦,贴出来大家指点一下:
t1=0:0.01:5
x1=sin(0.2*pi*t1)
s1=0.2*exp(-5*t1).*sin(10*pi*t1)+x1
t2=5:0.01:10
x2=sin(0.2*pi*t2)
s2=0.2*exp(-5*(t2-5)).*sin(10*pi*(t2-5))+x2
t3=10:0.01:15
x3=sin(0.2*pi*t3)
s3=0.2*exp(-5*(t3-10)).*sin(10*pi*(t3-10))+x3
t4=15:0.01:20
x4=sin(0.2*pi*t4)
s4=0.2*exp(-5*(t4-15)).*sin(10*pi*(t4-15))+x4
t5=20:0.01:25
x5=sin(0.2*pi*t5)
s5=0.2*exp(-5*(t5-20)).*sin(10*pi*(t5-20))+x5
t6=25:0.01:30
x6=sin(0.2*pi*t6)
s6=0.2*exp(-6*(t6-25)).*sin(10*pi*(t6-25))+x6
plot(t1,s1,t2,s2,t3,s3,t4,s4,t5,s5,t6,s6) |