Home > matpower7.1 > mp-opt-model > lib > have_feature_evalc.m

have_feature_evalc

PURPOSE ^

HAVE_FEATURE_EVALC Detect availability/version info for EVALC

SYNOPSIS ^

function [TorF, vstr, rdate] = have_feature_evalc()

DESCRIPTION ^

HAVE_FEATURE_EVALC  Detect availability/version info for EVALC

   Feature detection function implementing 'evalc' tag for HAVE_FEATURE
   to detect support for EVALC function.

   See also HAVE_FEATURE, EVALC.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [TorF, vstr, rdate] = have_feature_evalc()
0002 %HAVE_FEATURE_EVALC  Detect availability/version info for EVALC
0003 %
0004 %   Feature detection function implementing 'evalc' tag for HAVE_FEATURE
0005 %   to detect support for EVALC function.
0006 %
0007 %   See also HAVE_FEATURE, EVALC.
0008 
0009 %   MP-Opt-Model
0010 %   Copyright (c) 2004-2020, Power Systems Engineering Research Center (PSERC)
0011 %   by Ray Zimmerman, PSERC Cornell
0012 %
0013 %   This file is part of MP-Opt-Model.
0014 %   Covered by the 3-clause BSD License (see LICENSE file for details).
0015 %   See https://github.com/MATPOWER/mp-opt-model for more info.
0016 
0017 TorF = exist('evalc') ~= 0;
0018 if TorF
0019     if have_feature('matlab')
0020         v = have_feature('matlab', 'all');
0021     else
0022         v = have_feature('octave', 'all');
0023         TorF = 0;   %% In Octave, evalc was introduced in 4.2.x, but as of 6.x
0024                     %% we still choose to ignore evalc in Octave since it does
0025                     %% not capture the output of all functions (e.g. .mex/.oct
0026                     %% functions such as ipopt, glpk), which is one of the
0027                     %% main reasons we'd like to use it. Not only does it not
0028                     %% capture the output, it also does not prevent it from
0029                     %% going to the console.
0030     end
0031     vstr  = v.vstr;
0032     rdate = v.date;
0033 else
0034     vstr = '';
0035     rdate = '';
0036 end

Generated on Fri 09-Oct-2020 11:21:31 by m2html © 2005