?? dead_zone_q.m
字號:
function Y=dead_zone_q(X,qstep)
%x = dead_zone_q(x,qstep)
%Version: 1.00, Date: 2004/12/01, author: Nikola Sprljan
%Quantisation with a dead-zone around zero
%
%Input:
% X - original matrix
% qstep - quantisation step (threshold)
%
%Output:
% Y - quantised matrix
%
%Note:
% Dead zone is equal to the quantisation step, i.e. all coefficients whose
% absolute value is <qstep get quantised to 0.
%
%Example:
% Y=dead_zone_q(X,0.5);
if (~isfloat(X)) X = double(X);end;
Xs = sign(X);
Y = abs(X);
Y(Y<qstep) = 0;
Y = floor(Y/qstep);
Y(Y~=0) = Y(Y~=0)+0.5;
Y = Xs.*Y*qstep;
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -