gclbl.m
来自「这是一个用于语音信号处理的工具箱」· M 代码 · 共 54 行
M
54 行
% Script : label the gain envelop of the GCI display using the mouse or
% delabel the envelope, i.e., remove a label.
%
% gclbl.m is a call_function executed by "env_lbl" on figure(Gcset_f).
figure(Gcdis_f);
val=get(env_lbl,'Value');
[xx,yy]=ginput(1); % graphic input
%-----------------------------------------------%
% label the pitch wave using the mouse %
%-----------------------------------------------%
if val==1
ax=1:nframe;
[dum,x_idx]=min( abs(xx-ax) );
xx=ax(x_idx);
yy=genv1(x_idx);
% insert knobs into the knob sequence
knob_xx=[knob_xx xx];
knob_yy=[knob_yy yy];
[knob_xx,ii]=sort(knob_xx); % sort the sequence according to its x-axis value
knob_yy=knob_yy(ii);
% plot the labeled point
hold on;
plot(xx,yy,'g*')
hold off;
%-----------------------------------------------%
% delabel the pitch wave using the mouse %
%-----------------------------------------------%
elseif val==2 & length(knob_xx)>2
% delete one spline knob
[dum,x_idx]=min( abs(xx-knob_xx) );
xx=knob_xx(x_idx);
yy=knob_yy(x_idx);
hold on;
plot(xx,yy,'mo'); hold off;
knob_xx(x_idx)=[];
knob_yy(x_idx)=[];
end
clear ax xx yy x_idx;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?