📄 weight_sep.m
字号:
function w = weight_sep(N, M1, M2, ws, wp)
% compute the weighting matrix for separable model for diamond lowpass
% e.g., w = weight_sep(64, 10, 6, 1, 0.1)
% input: N -- total size, N must be even
% M1 -- for stopband
% M2 -- for passband
% ws -- weight for stopband
% wp -- weight for passband
% Copyright (c) 2006 Yi Chen
% % M1+M2-1 is the width of the transition band
w1 = diamond(N-1+2*M1, N-1+2*M1);
w2 = diamond(N+1-2*M2, N+1-2*M2);
% weights for the stopband
w = ws*(1-w1(M1:N+M1, M1:N+M1));
% plus weights for the passband
w(M2+1:N+1-M2, M2+1:N+1-M2) = wp*w2 + w(M2+1:N+1-M2, M2+1:N+1-M2);
% figure; mesh(w)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -