MPTESTVER Prints or returns MP-Test version info. V = MPTESTVER returns the current MP-Test version numbers. V = MPTESTVER('all') returns a struct with the fields Name, Version, Release and Date (all char arrays). Calling MPTESTVER without assigning the return value prints the version and release date of the current installation of MP-Test.
0001 function rv = mptestver(varargin) 0002 %MPTESTVER Prints or returns MP-Test version info. 0003 % V = MPTESTVER returns the current MP-Test version numbers. 0004 % V = MPTESTVER('all') returns a struct with the fields Name, Version, 0005 % Release and Date (all char arrays). Calling MPTESTVER without assigning 0006 % the return value prints the version and release date of the current 0007 % installation of MP-Test. 0008 0009 % MP-Test 0010 % Copyright (c) 2010-2020, Power Systems Engineering Research Center (PSERC) 0011 % by Ray Zimmerman, PSERC Cornell 0012 % 0013 % This file is part of MP-Test. 0014 % Covered by the 3-clause BSD License (see LICENSE file for details). 0015 % See https://github.com/MATPOWER/mptest for more info. 0016 0017 v = struct( 'Name', 'MP-Test', ... 0018 'Version', '7.1', ... 0019 'Release', '', ... 0020 'Date', '08-Oct-2020' ); 0021 if nargout > 0 0022 if nargin > 0 0023 rv = v; 0024 else 0025 rv = v.Version; 0026 end 0027 else 0028 fprintf('%-22s Version %-10s %-11s\n', v.Name, v.Version, v.Date); 0029 end