1% GET [overload base function] 2 3% Copyright Notice 4% 5% Copyright (C) 2018 CentraleSupelec 6% 7% Author: Julien Bect <julien.bect@centralesupelec.fr> 8 9% Copying Permission Statement 10% 11% This file is part of 12% 13% STK: a Small (Matlab/Octave) Toolbox for Kriging 14% (http://sourceforge.net/projects/kriging) 15% 16% STK is free software: you can redistribute it and/or modify it under 17% the terms of the GNU General Public License as published by the Free 18% Software Foundation, either version 3 of the License, or (at your 19% option) any later version. 20% 21% STK is distributed in the hope that it will be useful, but WITHOUT 22% ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 23% or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public 24% License for more details. 25% 26% You should have received a copy of the GNU General Public License 27% along with STK. If not, see <http://www.gnu.org/licenses/>. 28 29function value = get (gn, propname) 30 31switch propname 32 33 case {'log_dispersion', 'variance_function'} 34 value = gn.(propname); 35 36 case 'dispersion' 37 value = exp (gn.log_dispersion); 38 39 otherwise 40 if ~ ischar (propname) 41 errmsg = 'Invalid property name.'; 42 else 43 errmsg = sprintf ('There is no field named %s.', propname); 44 end 45 stk_error (errmsg, 'InvalidArgument'); 46 47end % switch 48 49end % function 50