ana.m

来自「这是一个用于语音信号处理的工具箱」· M 代码 · 共 112 行

M
112
字号
% Script : create a Graphical User Interface for analysis
% In this mfile, three figures 'f_win_f', 'a_win_f', 's_win_f' are created.


%----------------------------------------------------------%
%  create 'a_win_f' Graphical User Interface     (main)    %
%----------------------------------------------------------%

a_win_f=figure('Unit','normalized',...
   'Position',[0.05 0.1 0.20 0.3],...
   'Resize','on',...
   'Color','white',...
   'Numbertitle','off',...
   'Name','Analysis');

a_pp_sp=uicontrol('Style','Pushbutton',...
   'Unit','normalized',...
   'Position',[.1 .85 .8 .1],...
   'String','Specification',...
   'Callback','Amset;');
%callback function: [Amset.m]   

a_pb_sp=uicontrol('Style','Pushbutton',...
   'Units','normalized',...
   'Position',[.1 .7 .8 .1],...
   'String','Load speech file',...
   'CallBack','ldsp');
%callback function: [ldsp.m] 

a_cb_cor=uicontrol('Style','Checkbox',...
   'Unit','normalized',...
   'Position',[.1 .55 .8 .1],...
   'Value',1,...
   'String','Visual correction');


exe_pb=uicontrol('Style','Pushbutton',...
   'Units','normalized',...
   'Position',[.1 .40 .8 .1],...
   'String','Execution',...
   'Callback','exe');
%callback function: [exe.m]       


a_pb_sv=uicontrol('Style','Pushbutton',...
   'Units','normalized',...
   'Position',[.1 .25 .8 .1],...
   'Visible','off',...
   'String','Save analysis result',...
   'CallBack','showoff(ana_f_win_f,1);');

return_pb=uicontrol('Style','Pushbutton',...
   'Units','normalized',...
   'Position',[.1 .1 .8 .1],...
   'String','Return to main menu',...
   'CallBack','showoff(a_win_f);close(s_win_f); showoff(ana_work_f); figure(v_win_f);');

%------------------------------------------------------%
% create 's_win_f' window for displaying the signal that is loaded %
%------------------------------------------------------%
s_win_f=figure('Unit','normalized',...
   'Position',[0.35 0.4 0.6 0.45],...
   'Resize','on',...
   'Visible','off',...
   'Color',[0.5 0.5 0.5],...
   'Numbertitle','off',...
   'Name','Input Signal Display');
whitebg(s_win_f,'w');

%----------------------------------------------------------%
%  create 'ana_f_win_f' window to enter the file-name to   %
%           save the analyzed speech                       %
%----------------------------------------------------------%

ana_f_win_f=figure('Unit','normalized',...
   'Position',[0.5 0.5 0.45 0.2],...
   'Resize','on',...
   'Color','white',...
   'Visible','off',...
   'Numbertitle','off',...
   'Name','Save Result');

ana_sv_text=uicontrol('Style','text',...
   'Unit','normalized',...
   'Position',[.2 .87 .6 .1],...
   'String','save as:',...
   'BackGroundColor','White');

ana_file_edit=uicontrol('Style','edit',...
   'String','xx.mat',...
   'Units','normalized',...
   'Position',[.2 .53 .6 .28]);

ana_f_pb_app=uicontrol('Style','Pushbutton', ...
   'String','Apply',...
   'Units','normalized',...
   'Position',[.2 .1 .6 .25],'Callback', 'svdata;showoff(ana_f_win_f);');
%callback function [svdata.m]

%----------------------------------------------------------%
%  create 'ana_work_f' window to enter the file-name to    %
%           save the analyzed speech                       %
%----------------------------------------------------------%

ana_work_f=figure('Unit','normalized',...
   'Position',[0.4 0.5 0.55 0.15],...
   'Resize','off',...
   'Color','white',...
   'Numbertitle','off',...
   'Visible','off',...
   'Name','message');

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?