Checks to see which version of SPM5 we are dealing with. This is a bit tenuous because we are assuming version.txt for SPM5 is on path before any other possible instance of version.txt Assume version# 958 if version.txt not found. This is really dicey.
0001 function version_num = get_spm_version() 0002 % Checks to see which version of SPM5 we are dealing with. This is a bit 0003 % tenuous because we are assuming version.txt for SPM5 is on path before 0004 % any other possible instance of version.txt 0005 % 0006 % Assume version# 958 if version.txt not found. This is really dicey. 0007 0008 0009 if ~exist('version.txt') 0010 version_num = 957; 0011 else 0012 version_info = textread('version.txt','%s'); 0013 revidx = strmatch('Revision:', version_info); 0014 version_num = str2num(version_info{revidx+1}); 0015 end