📄 ltfatmex.m
字号:
function ltfatmex(optclean)%LTFATMEX Compile Mex/Oct interfaces% Usage: ltfatmex;% ltfatmex('clean');%% LTFATMEX compiles certain functions written in C in order to speed% up the execution of the toolbox. %% LTFATMEX('clean') removes the compiled functions.% 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/>.error(nargchk(0,1,nargin));global TF_CONF;% Verify that TF_CONF has been initializedif numel(TF_CONF)==0 disp(''); disp('--- LTFAT - The Linear Time Frequency Analysis toolbox. ---'); disp('') disp('To start the toolbox, call LTFATSTART as the first command.'); disp(''); return;end;bp=TF_CONF.basepath;% Remember the current directory.curdir=pwd;if (nargin>0) && strcmp(lower(optclean),'clean') if isoctave cd([bp,'oct']); deletefiles('o'); deletefiles('oct'); else % Delete files permanently (bypass trashcan on Windows/Mac % but remember the old state oldstate = recycle('off'); ext = mexext; cd([bp,'mex']); deletefiles(ext); recycle(oldstate); end;else if isoctave cd([bp,'oct']); mkoctfile('-I../thirdparty','-I.','comp_wfac.cc'); mkoctfile('-I../thirdparty','-I.','comp_iwfac.cc'); mkoctfile('-I../thirdparty','-I.','comp_dgt_fac.cc'); mkoctfile('-I../thirdparty','-I.','comp_idgt_fac.cc'); mkoctfile('-I../thirdparty','-I.','comp_candual_fac.cc'); mkoctfile('-I../thirdparty','-I.','comp_cantight_fac.cc'); %mkoctfile('-I../thirdparty','-I.','comp_bee_anneal.cc') else cd([bp,'mex']); v=version; % Do not compile anything using FFTW / BLAS / LAPACK under Windows or under Matlab 6 or % earlier. if (~ispc) && (str2num(v(1))>6) mex('-I../thirdparty','-I.','comp_wfac.c'); mex('-I../thirdparty','-I.','comp_iwfac.c'); mex('-I../thirdparty','-I.','comp_dgt_fac.c'); mex('-I../thirdparty','-I.','comp_idgt_fac.c'); mex('-I../thirdparty','-I.','comp_candual_fac.c'); mex('-I../thirdparty','-I.','comp_cantight_fac.c'); end; %mex('-I../thirdparty','-I.','comp_bee_anneal.c') %mex('-I.','comp_wincon.c') end;end;% Jump back to the original directory.cd(curdir);function deletefiles(ext) delete(['comp_wfac.',ext]); delete(['comp_iwfac.',ext]); delete(['comp_dgt_fac.',ext]); delete(['comp_idgt_fac.',ext]); delete(['comp_dgt_fac.',ext]); delete(['comp_idgt_fac.',ext]); delete(['comp_candual_fac.',ext]); delete(['comp_cantight_fac.',ext]); %delete(['comp_bee_anneal.',ext]);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -