ATTACHM attach the m file being executes to the analysis object. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: ATTACHM attach the m file being executes to the analysis object. CALL: VERSION: $Id: attachm.m,v 1.3 2007/10/31 17:03:45 ingo Exp $ HISTORY: 31-03-07 M Hewitson Creation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0001 function a = attachm(a, mfile) 0002 % ATTACHM attach the m file being executes to the analysis object. 0003 % 0004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0005 % 0006 % DESCRIPTION: ATTACHM attach the m file being executes to the analysis object. 0007 % 0008 % CALL: 0009 % 0010 % VERSION: $Id: attachm.m,v 1.3 2007/10/31 17:03:45 ingo Exp $ 0011 % 0012 % HISTORY: 31-03-07 M Hewitson 0013 % Creation 0014 % 0015 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0016 0017 VERSION = '$Id: attachm.m,v 1.3 2007/10/31 17:03:45 ingo Exp $'; 0018 0019 % Check if this is a call for parameters 0020 if nargin == 2 0021 if isa(a, 'ao') && ischar(mfile) 0022 in = char(mfile); 0023 if strcmp(in, 'Params') 0024 a = plist; 0025 return 0026 elseif strcmp(in, 'Version') 0027 a = VERSION; 0028 return 0029 end 0030 end 0031 end 0032 0033 0034 [pathstr,name,ext,vers] = fileparts(mfile); 0035 if isempty(ext) 0036 mfile = [mfile '.m']; 0037 end 0038 a.mfile = textread(mfile,'%s','delimiter','\n','whitespace',''); 0039 a.mfilename = mfile; 0040 0041