天天看點

matlab畫出高斯 Morlet DOG小波圖像 并加粗線條 代碼

x=-6:0.1:6;
figure(1)
% y=exp(-x.*x/2)-0.5*exp(-x.*x/8);
% % DOG小波基函數,兩個尺度差一倍的高斯函數之差
% subplot(2,2,1);
% plot(x,y)
% grid on
% set(gca,'YTick',-1:0.1:1);
% % 這裡的尺度參數a是1,位移因子b是0

y=x.*exp(-x.*x/2);
% 高斯小波基函數  
subplot(1,2,1);
plot(x,y,'LineWidth',3)
grid on
set(gca,'YTick',-1:0.2:1);
set(gca,'XTick',-6:2:6);

% y=cos(1.75.*x).*exp(-x.*x/2);
% Morlet小波基函數  
% subplot(1,2,1);
% plot(x,y)
% grid on
% set(gca,'YTick',-1:0.1:1);

y=(1-x.*x).*exp(-x.*x/2);
% % 墨西哥草帽小波基函數
subplot(1,2,2);
plot(x,y,'LineWidth',3)
grid on
set(gca,'YTick',-1:0.2:1);
set(gca,'XTick',-6:2:6);
           

繼續閱讀