checkMATLABVersion error if the MATLAB version is not suitable
0001 function checkMATLABVersion() 0002 %checkMATLABVersion error if the MATLAB version is not suitable 0003 0004 % Copyright 2011 The MathWorks, Inc. 0005 0006 v = ver('MATLAB'); 0007 v = regexp( v.Version, '(?<major>\d+)\.(?<minor>\d+)', 'names' ); 0008 v.major = str2double( v.major ); 0009 v.minor = str2double( v.minor ); 0010 if (v.major < 7) || ((v.major==7) && (v.minor<13)) 0011 error( 'GPUBench:MATLABVersion', 'GPUBench requires MATLAB version 7.13 (R2011b) or higher' ); 0012 end