时间0-1,0.0001间隔,产生一个频率为1,振幅1的sin,然后产生一个频率为1000,振幅1的cos,两个相乘,相加,以子图展示这两个图,给出matlab代码

动态 未结 0 76
小小草
小小草 LV1 2023年9月23日 23:40 发表
t = 0:0.0001:1; x1 = sin(2*pi*t); x2 = cos(2*pi*1000*t); x3 = x1.*x2; x4 = x1+x2; subplot(2,1,1); plot(t,x1,'r'); hold on; plot(t,x2,'b'); legend('sin','cos'); title('Sin and Cos Waves'); subplot(2,1,2); plot(t,x3,'g'); hold on; plot(t,x4,'m'); legend('sin*cos','sin+cos'); title('Multiplication and Addition of Sin and Cos Waves');
收藏(0)  分享
相关标签: 智能问答
问题没解决?让AI助手帮你作答 AI助手
0个回复
  • 消灭零回复