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

动态 未结 0 84
小小草
小小草 LV1 2023年9月23日 23:40 发表
```matlab % 产生频率为1,振幅为1的sin信号 t = 0:0.01:2*pi; x1 = sin(t); % 产生频率为1000,振幅为1的cos信号 x2 = cos(1000*t); % 两个信号相乘 x3 = x1 .* x2; % 两个信号相加 x4 = x1 + x2; % 绘制子图 subplot(2,2,1); plot(t,x1); title('Sin Signal'); subplot(2,2,2); plot(t,x2); title('Cos Signal'); subplot(2,2,3); plot(t,x3); title('Multiplication of Sin and Cos Signals'); subplot(2,2,4); plot(t,x4); title('Addition of Sin and Cos Signals'); ```
收藏(0)  分享
相关标签: 智能问答
问题没解决?让AI助手帮你作答 AI助手
0个回复
  • 消灭零回复