0001 function [TorF, vstr, rdate] = have_feature_matlab()
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 v = ver('matlab');
0018 if length(v) > 1
0019 warning('The built-in VER command is behaving strangely, probably as a result of installing a 3rd party toolbox in a directory named ''matlab'' on your path. Check each element of the output of ver(''matlab'') to find the offending toolbox, then move the toolbox to a more appropriately named directory.');
0020 v = v(1);
0021 end
0022 if ~isempty(v) && isfield(v, 'Version') && ~isempty(v.Version)
0023 TorF = 1;
0024 vstr = v.Version;
0025 rdate = v.Date;
0026 else
0027 TorF = 0;
0028 vstr = '';
0029 rdate = '';
0030 end