%生成正弦信号
N=1000;
t=1:N;
sig1=sin(0.3*t);
%生成三角波信号
sig2(1:500)=((1:500)-1)/500;
sig2(501:N)=(1000-(501:1000))/500;
figure(1);
subplot(2,1,1);plot(t,sig1,'LineWidth',2);xlabel('时间 t/s');ylabel('幅值 A');
subplot(2,1,2);plot(t,sig2,'LineWidth',2);xlabel('时间 t/s');ylabel('幅值 A');
%叠加信号
x=sig1+sig2;
figure(2)
plot(t,x,'LineWidth',2);xlabel('时间 t/s');ylabel('幅值 A');
%一维小波分解
[c,l] = wavedec(x,6,'db5');
%重构第1~6层逼近系数
a6 = wrcoef('a',c,l,'db5',6);
a5 = wrcoef('a',c,l,'db5',5);
a4 = wrcoef('a',c,l,'db5',4);
a3 = wrcoef('a',c,l,'db5',3);
a2 = wrcoef('a',c,l,'db5',2);
a1 = wrcoef('a',c,l,'db5',1);
%显示逼近系数
figure(3)
subplot(6,1,1);plot(a6,'LineWidth',2);ylabel('a6');
subplot(6,1,2);plot(a5,'LineWidth',2);ylabel('a5');
subplot(6,1,3);plot(a4,'LineWidth',2);ylabel('a4');
subplot(6,1,4);plot(a3,'LineWidth',2);ylabel('a3');
subplot(6,1,5);plot(a2,'LineWidth',2);ylabel('a2');
subplot(6,1,6);plot(a1,'LineWidth',2);ylabel('a1');
xlabel('时间 t/s');
%重构第1~6层细节系数
d6 = wrcoef('d',c,l,'db5',6);
d5 = wrcoef('d',c,l,'db5',5);
d4 = wrcoef('d',c,l,'db5',4);
d3 = wrcoef('d',c,l,'db5',3);
d2 = wrcoef('d',c,l,'db5',2);
d1 = wrcoef('d',c,l,'db5',1);
%显示细节系数
figure(4)
subplot(6,1,1);plot(d6,'LineWidth',2);ylabel('d6');
subplot(6,1,2);plot(d5,'LineWidth',2);ylabel('d5');
subplot(6,1,3);plot(d4,'LineWidth',2);ylabel('d4');
subplot(6,1,4);plot(d3,'LineWidth',2);ylabel('d3');
subplot(6,1,5);plot(d2,'LineWidth',2);ylabel('d2');
subplot(6,1,6);plot(d1,'LineWidth',2);ylabel('d1');
xlabel('时间 t/s');
![avatar](https://profile-avatar.csdnimg.cn/3542a6830a364bf6a0adb34bfd72ce9d_weixin_42662605.jpg!1)
APei
- 粉丝: 84
- 资源: 1万+
最新资源
- 智能制造质量管控-YOLOv11结合机械臂的实时零件分拣系统搭建.pdf
- 主干网络魔改-Transformer-CNN混合架构在YOLOv11中的实践.pdf
- 自动驾驶多目标跟踪-YOLOv11障碍物距离估计算法优化.pdf
- 自动驾驶感知升级-YOLOv11多目标测距与避障算法详解.pdf
- 自动驾驶感知升级-YOLOv11多模态数据融合的行人避障系统.pdf
- 自动驾驶感知升级-YOLOv11多模态障碍物识别与碰撞预警系统.pdf
- 自动驾驶感知升级-YOLOv11多目标跟踪与碰撞预警算法解析.pdf
- 自动驾驶感知升级-YOLOv11多目标跟踪与BEVformer融合实战.pdf
- 自动驾驶感知升级-YOLOv11夜间低光照环境下的障碍物检测优化(自动驾驶).pdf
- 自动驾驶感知系统升级-YOLOv11多目标追踪与障碍物测距优化策略.pdf
- 自动驾驶核心-YOLOv11多传感器融合障碍物检测模型架构揭秘.pdf
- 自动驾驶感知优化-YOLOv11多目标跟踪与障碍物距离测量实践.pdf
- 自动驾驶核心技术-YOLOv11多目标跟踪与障碍物轨迹预测优化.pdf
- 自动驾驶核心技术-YOLOv11多目标轨迹预测与碰撞预警算法优化.pdf
- 自动驾驶核心技术-YOLOv11障碍物实时检测与多模态数据融合方案.pdf
- 自动驾驶进阶-YOLOv11多模态融合的道路障碍物检测系统优化.pdf
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback-tip](https://img-home.csdnimg.cn/images/20220527035111.png)
评论2