📄 mkindex.m
字号:
function [lpf, hpf]=mkindex(N,c_c_min,c_c_max,c_u_min,c_u_max, edge)
%$Id: mkindex.m,v 1.1.1.1 2000/10/16 09:30:40 mattb Exp $
%===========================================================================
% Matt Bowers - University of Bath
%
% Copyright (c) 1996
%===========================================================================
%
% Creates the matrices used by 'wt2dscl' to index the input to the transform
%
% Arguements:
% N length of input data to transform
% c_c_min }
% c_c_max } these are the min and max filter tap numbers for c_c and c_u
% c_u_min }
% c_u_max }
% edge defines edge handling - as defined in 'iwt2dscl'
%
% Returns:
% lpf the indexing matrix for low band analysis filter
% hpf the indexing matrix for high band analysis filter
%
%===========================================================================
half_N=fix(N/2); % Half N
lc=c_c_max-c_c_min+1; % Filter length
lu=c_u_max-c_u_min+1; % Filter length
lpf=zeros(half_N,lc); % Construct lpf and hpf
hpf=zeros(half_N,lu);
for x=0:(half_N-1)
i = [(c_c_min+x+x) : (c_c_max+x+x)];
if edge==2
[i dummy]=rfl_22(i,N);
elseif edge==1
i=rfl_11(i,N);
else
i=wrap(i,N);
end
lpf(x+1,:)=i+1;
i = [(1-c_u_max+x+x) : (1-c_u_min+x+x)];
if edge==2
[i dummy]=rfl_22(i,N);
elseif edge==1
i=rfl_11(i,N);
else
i=wrap(i,N);
end
hpf(x+1,:)=i+1;
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -