


GET get history object properties.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DESCRIPTION: GET get history object properties.
CALL: name = get(h, 'name');
ver = get(h, 'version');
pl = get(h, 'plist');
inhist = get(h, 'inhist');
invars = get(h, 'invars');
n = get(h, 'n');
pn = get(h, 'pn');
created = get(h, 'created');
consver = get(h, 'consver');
VERSION: $Id: get.m,v 1.6 2007/12/04 18:16:11 ingo Exp $
HISTORY: 30-01-07 M Hewitson
Creation
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

0001 function val = get(h, propName) 0002 % GET get history object properties. 0003 % 0004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0005 % 0006 % DESCRIPTION: GET get history object properties. 0007 % 0008 % CALL: name = get(h, 'name'); 0009 % ver = get(h, 'version'); 0010 % pl = get(h, 'plist'); 0011 % inhist = get(h, 'inhist'); 0012 % invars = get(h, 'invars'); 0013 % n = get(h, 'n'); 0014 % pn = get(h, 'pn'); 0015 % created = get(h, 'created'); 0016 % consver = get(h, 'consver'); 0017 % 0018 % VERSION: $Id: get.m,v 1.6 2007/12/04 18:16:11 ingo Exp $ 0019 % 0020 % HISTORY: 30-01-07 M Hewitson 0021 % Creation 0022 % 0023 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0024 0025 VERSION = '$Id: get.m,v 1.6 2007/12/04 18:16:11 ingo Exp $'; 0026 0027 % Check if this is a call for parameters 0028 if nargin == 2 0029 if isa(h, 'history') && ischar(propName) 0030 in = char(propName); 0031 if strcmp(in, 'Params') 0032 val = plist; 0033 return 0034 elseif strcmp(in, 'Version') 0035 val = VERSION; 0036 return 0037 end 0038 end 0039 end 0040 0041 switch propName 0042 case 'name' 0043 val = h.name; 0044 case 'version' 0045 val = h.version; 0046 case 'plist' 0047 val = h.plist; 0048 case 'inhists' 0049 val = h.inhists; 0050 case 'invars' 0051 val = h.invars; 0052 case 'n' 0053 val = h.n; 0054 case 'pn' 0055 val = h.pn; 0056 case 'created' 0057 val = h.created; 0058 case 'consver' 0059 val = h.consver; 0060 otherwise 0061 error([propName, ' is not a valid history property.']); 0062 end 0063