⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 norm_max.m

📁 Matlab 二进小波变换程序
💻 M
字号:
function [m,n]=norm_max(x)
%--------------------------------------------------------------------------
%
% NORM_MAX calculate the norm max of the wavelet decomposition.
% 
%    M = NORM_MAX(X) returns the Norm Max of the matrix X.
%    
%    Yang Yu-shan 15-Nov-2006.
%    Last Revision: 15-Nov-2006.
%    Institude of Geophysics and Geomatics, China Univercity of Geosciensis.
%    $Revision: 1.0 $ $Date: 2006/11/15 10:40:30 $
% 
%--------------------------------------------------------------------------

[rn,cn] = size(x);
m = zeros(rn,cn);
n = m;
for i = 1:cn
    xx = x(:,i);%xx = abs(x(:,i));
    for j = 2:rn-1
        if xx(j-1)<xx(j)&xx(j+1)<xx(j)|xx(j-1)>xx(j)&xx(j+1)>xx(j)
            m(j,i)=x(j,i);
        end
    end
end

for i = 1:rn
    b=1;
    for j = 1:cn
        b=(b~=0&m(i,j)~=0);
    end
    if b~=0, n(i,:)=m(i,:); end
end

for i = 1:cn
    subplot(cn,1,i);
    plot(m(:,i));
end
figure
for i = 1:cn
    subplot(cn,1,i);
    plot(n(:,i));
end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -