?? 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 + -