联系QQ:

2181264433

新闻资讯
联系我们
联系:张女士
微信:扫一扫右侧二维码
QQ :2181264433
邮箱:2181264433@qq.com
地址:浙江省-嘉兴市-南湖区
网址:www.mhslogic.com
您当前位置:首页 > 国内资讯 > 正文国内资讯
MATLAB代做|FPGA代做|simulink代做——小波加密算法22
添加时间:2020-5-30 来源:本站整理
clc;
clear;
close all;
warning off;

load Data190329111438.mat
 



Y = azg(1:end-1); 
 



Y = Y-mean(Y);
 
 
% 'haar'   : Haar wavelet.
% 'dmey'   : Discrete Meyer wavelet.

% 'db'     : Daubechies wavelets.
% 'sym'    : Symlets.
 
 
 


 
 
 
wname='db3';
level=5;
[c,l]=wavedec(Y,level,wname);
a5=wrcoef('a',c,l,wname,5);
a4=wrcoef('a',c,l,wname,4);
a3=wrcoef('a',c,l,wname,3);
a2=wrcoef('a',c,l,wname,2);
a1=wrcoef('a',c,l,wname,1);

figure
subplot(321);plot(Y);title('Y');
subplot(322);plot(a1);title('a1'); 
subplot(323);plot(a2);title('a2'); 
subplot(324);plot(a3);title('a3'); 
subplot(325);plot(a4);title('a4'); 
subplot(326);plot(a5);title('a5'); 
 



[pks,locs]=findpeaks(a3,'minpeakdistance',50);
indx=[];
for i = 1:length(a3)-1
    if a3(i)<0 & a3(i+1)>0 | a3(i)>0 & a3(i+1)<0
       indx=[indx,i];
    end
end



figure
plot(Times(1:end-1),a3);
hold on
plot(Times(locs),a3(locs),'ro');
hold on
plot(Times(indx),a3(indx),'k*');
hold on
stem(Times(locs),a3(locs),'ro')

Times(locs)

Times(indx)








扫一扫,关注我们