📄 gaintr.m
字号:
%FUNCTION GAINTR constructs the gain contour from the gain parameters,
% also decomposes the gain contour into two factors.
%
% USUAGE: [genv,gb,gntour]=gaintr(ngm);
% INPUT : ngm == the average gain of each frame
% OUTPUT : genv == the gain envelop
% gb == the perturbation of the gain contour
% gntour == the gain contour
function [genv,gb,gntour]=gaintr(ngm);
%
% 1. smooth the gain envelope
%
[nfram,dum]=size(ngm);
gntour=zeros(1,nfram);
gntour(1)=mean( ngm(1,1:4) );
for kf=2:nfram-1
gntour(kf)=mean([ngm(kf-1,4) ngm(kf,1:4) ngm(kf+1,1)]); % gaim contour
end
gntour(nfram)=mean( ngm(nfram,1:4) );
genv=medfilt(gntour,5);
genv=genv-mean(genv)+mean(gntour);
%
% 2. calculate the gain perturbation
%
gcpert=(gntour-genv)./genv;
% delete 10% biggest deviation
N1=fix( length(genv)*9/10 );
[dum indx]=sort( abs(gcpert) );
gcpert=gcpert( indx(1:N1) );
gb=std(gcpert);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -