2023 01月07日
作者: 小白哥
  • 浏览: 302
  • 收藏:0
  • 点赞:1
MATLAB三种基本小波函数

1.代码

clear
clc
%haar小波
haar=@(x) 1.*(x>=0&x<=1/2)-1.*(x>1/2&x<=1)+0.*(x>1&x<0);
x=-2:0.01:10;
y1=haar(x);
figure(1)
subplot(2,1,1)
plot(x,y1);
title('基本小波函数Haar')
subplot(2,1,2)
y2=1/sqrt(3).*haar((x-2)/3);
plot(x,y2);
title('小波基')
%morlet小波
lb=-4;
ub=4;
n=1000;
[psi,xval]=morlet(lb,ub,n);
figure(2)
plot(xval,psi)
title('基本小波函数Morlet')
%Mexican Hat(墨西哥草帽)小波
lb=-5;
ub=5;
N=1000;
[psi,xval]=mexihat(lb,ub,N);
figure(3)
plot(xval,psi)
title('基本小波函数Mexican Hat')

2.运行结果

2.jpg

3.jpg

4.jpg


  

发表评论

评论列表


没有评论

筛选

文章分类

热门文章

企业招聘网址

2023-12-07  浏览:3001次

BC1.2协议介绍

2023-06-14  浏览:2902次

USB2.0速度识别

2023-10-23  浏览:1333次