0001 function [] = buildmat(build_mode,dirname,str)
0002
0003
0004
0005
0006
0007
0008 cd(dirname)
0009 delete('*.mat')
0010 pause(2)
0011 if nargin < 3,
0012 filelist = dir(['make_',lower(dirname(1:strfind(dirname,'_'))),'*.m']);
0013 else
0014 filelist = dir(['make_',str,'*.m']);
0015 end
0016 save temp.mat filelist dirname build_mode
0017
0018 for i = 1:length(filelist),
0019 file = strrep(filelist(i,1).name,'.m','');
0020 if build_mode,
0021 eval(file);
0022 else
0023 if isempty(strfind(file, 'h77'))
0024 eval(file);
0025 end
0026 end
0027 load temp.mat
0028 end
0029 info_dke_yp(2,['All *.mat files done in ',dirname,' directory.'])
0030 delete('temp.mat');
0031 cd ..
0032