buildmat

PURPOSE ^

LUKE - Create binary file (*.mat) from script or mexfile

SYNOPSIS ^

function [] = buildmat(build_mode,dirname,str)

DESCRIPTION ^

LUKE - Create binary file (*.mat) from script or mexfile

This script build all *.mat file from an existing script (*.m or mexfile)

 by  Yves Peysson <yves.peysson@cea.fr> (CEA/DSM/IRFM) and Joan Decker <joan.decker@cea.fr> (CEA/DSM/IRFM)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [] = buildmat(build_mode,dirname,str)
0002 %LUKE - Create binary file (*.mat) from script or mexfile
0003 %
0004 %This script build all *.mat file from an existing script (*.m or mexfile)
0005 %
0006 % by  Yves Peysson <yves.peysson@cea.fr> (CEA/DSM/IRFM) and Joan Decker <joan.decker@cea.fr> (CEA/DSM/IRFM)
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

Community support and wiki are available on Redmine. Last update: 18-Apr-2019.