📄 ltfatstart.m
字号:
function ltfatstart()%LTFATSTART Start the LTFAT toolbox.% Usage: ltfatstart;%% LTFATSTART starts the LTFAT toolbox. This command must be run% before using any of the function in the toolbox.%% You may manually edit this function to provide a more robust startup.% See the top of the body of this function.%% SEE ALSO: LTFATHELP% This program is free software: you can redistribute it and/or modify% it under the terms of the GNU General Public License as published by% the Free Software Foundation, either version 3 of the License, or% (at your option) any later version.% % This program is distributed in the hope that it will be useful,% but WITHOUT ANY WARRANTY; without even the implied warranty of% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the% GNU General Public License for more details.% % You should have received a copy of the GNU General Public License% along with this program. If not, see <http://www.gnu.org/licenses/>.% ------- Settings: ----------------------------------% --- general settings ---% Print the banner at startup?printbanner=1;% --- Settings for iterative algorithms ---% Problem sizes below this value will be handled by a direct approach.itercrossover=200;% Maximum number of iterations to do:itermaxit=200;% The precision to stop at:itertol=1e-10;% --- Settings for plots ---% Approximate resolution along time-axis.xres=800;% Ratio of frequency resolution versus time resolutiondisplayratio=3/4;% ----------------------------------------------------% ------- do not edit below this line ------------% ----------------------------------------------------% Get the basepath as the directory this function resides in.% The 'which' solution below is more portable than 'mfilename'% becase old versions of Matlab does not have "mfilename('fullpath')"basepath=which('ltfatstart');% Kill the function name from the path.basepath=basepath(1:end-13);% add the base pathif exist('addpath')>0 addpath(basepath);else path(path,basepath);endbp=[basepath,filesep];% Load the version number[FID, MSG] = fopen ([bp,'ltfat_version'],'r');if FID == -1 error(MSG);else ltfat_version = fgetl (FID); fclose(FID);end% Create and load the information.global TF_CONF;TF_CONF.basepath=bp;TF_CONF.ltfat_version=ltfat_version;TF_CONF.itercrossover=itercrossover;TF_CONF.itermaxit=itermaxit;TF_CONF.itertol=itertol;TF_CONF.xres=xres;TF_CONF.displayratio=displayratio;% ----------- install the modules -----------------modules={};nplug=0;% List all files in base directoryd=dir(basepath);for ii=1:length(d) if d(ii).isdir if ~(d(ii).name(1)=='.') name=d(ii).name; % The file is a directory and it does not start with '.' This could % be a module if exist([bp,name,filesep,name,'init.m'],'file') % Set 'status' to zero if the module forgets to define it. status=0; module_version=ltfat_version; if exist('addpath')>0 addpath([bp,name]); else path(path,[bp,name]); end eval([name,'init']); if status==1 nplug=nplug+1; modules{nplug}.name=name; modules{nplug}.version=module_version; else rmpath([bp,name]); end; end; end; end;end;TF_CONF.modules=modules;if printbanner disp(['LTFAT version ',ltfat_version,'. Copyright 2007 Peter L. Soendergaard. For help, please type "ltfathelp".'])end;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -