联系QQ:

2181264433

新闻资讯
联系我们
联系:张女士
微信:扫一扫右侧二维码
QQ :2181264433
邮箱:2181264433@qq.com
地址:浙江省-嘉兴市-南湖区
网址:www.mhslogic.com
您当前位置:首页 > 国内资讯 > 正文国内资讯
MATLAB代做|MATLAB专业代做|MATLAB淘宝代做|MATLAB SCI代做97小波变换
添加时间:2019-2-25 来源:本站整理
function y = dwt_lift_97(x)
%Lifting-based 1-D dwt(9/7)
alpha = -1.586134342;
beta = -0.052980118;
gama = 0.882911075;
delta = 0.443506852;
K = 1.230174105;
len = length(x);
flag = 0;
if mod(len,2) ~= 0      %边界延拓
    flag = 1;           %odd
    x = [x(5), x(4), x(3), x(2), x, x(len-1), x(len-2), x(len-3), x(len-4)];
    len = len+1;
else                    %even
    x = [x(5), x(4), x(3), x(2), x, x(len-1), x(len-2), x(len-3)];
end
L = len/2;
sTmp = x(1:2:len+7);
dTmp = x(2:2:len+7);

for i = [1:L+3]
    dTmp(i) = dTmp(i) + ( sTmp(i)+sTmp(i+1) )*alpha;
end
for i = [2:L+3]
    sTmp(i) = sTmp(i) + ( dTmp(i-1)+dTmp(i) )*beta;
end
for i = [2:L+2]
    dTmp(i) = dTmp(i) + ( sTmp(i)+sTmp(i+1) )*gama;
end
for i = [3:L+2]
    sTmp(i) = sTmp(i) + ( dTmp(i-1)+dTmp(i) )*delta;
end

if flag == 0
    y = [(1/K)*sTmp(3:L+2), (-K)*dTmp(3:L+2)];
else
    y = [(1/K)*sTmp(3:L+2), (-K)*dTmp(3:L+1)];
end

扫一扫,关注我们