new_excitation.m
来自「这是一个用于语音信号处理的工具箱」· M 代码 · 共 80 行
M
80 行
% Callback function for the new file call back in the
%source specifications window
%
%Author Karthik 1/98
file_flag = 0;
segment_no=1;
Nframe = 20; %Used to be default number of frames, now set by slider
Srate = 10000; %Default sampling rate
sslider='Set using slider';
% Set position and size of analysis window
PV = [203 312 240 170];
s2 = 'New Excitation: Set frame rate';
% Open analysis window
while exist('src_fig_2')==1
try1 = 'get(src_fig_2,''position'');';
eval(try1,catch2);
if check ==0
clear src_fig_2;
check = 1;
break;
end
s1 = get(src_fig_2,'Name');
if ~strcmp(s1,s2)
clear src_fig_2;
break;
end
figure(src_fig_2);
break;
end;
if exist('src_fig_2')~=1;
src_fig_2 = figure('Position',PV,...
'Numbertitle','off',...
'Color','white',...
'Name',s2);
uicontrol('Style','text',...
'Units','Normalized',...
'Position',[0.37 0.8 0.4 0.15],...
'String','Total Frames',...
'HorizontalAlignment','left',...
'BackgroundColor','white',...
'ForegroundColor','blue');
source_Nframe_edit = uicontrol('Style','Edit',...
'Units','Normalized',...
'Position',[0.20 0.65 0.6 0.15],...
'String',sslider);
src_frame_slider=uicontrol('Style','Slider',...
'Units','Normalized',...
'Position',[0.2 .45 0.5 .15], ...
'Value',segment_no,...
'Min',1,...
'Max',200,...
'BackGroundColor','white',...
'Callback', 'frame_slider');
src_frame_edit=uicontrol('Style','edit',...
'Units','Normalized',...
'Position',[0.8 .45 .15 .15], ...
'String',num2str(segment_no),...
'BackGroundColor','white',...
'ForeGroundColor','blue',...
'Callback','frame_edit');
uicontrol('Style','Pushbutton',...
'Units','Normalized',...
'Position',[0.1 0.2 0.8 0.15],...
'String','Create excitation',...
'Callback','excitation_create');
uicontrol('Style','Pushbutton',...
'Units','Normalized',...
'Position',[0.1 0.05 0.8 0.15],...
'String','Done/Cancel',...
'Callback','new_excitation_cancel');
end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?