www.gusucode.com > mbcmodels 工具箱 matlab 源码程序 > mbcmodels/@localtruncps/get.m

    function Value=get(m,Property)
%GET get local truncated spline properties
%   Value=get(m,Property)

%  Copyright 2000-2011 The MathWorks, Inc. and Ford Global Technologies, Inc.


if nargin==1;
   Value= [{'knot'};get(m.localmod);get(m.xreglinear)];
else
    switch lower(Property)
        case {'knot','knots'}
            Value= m.knots;
        case 'order'
            Value= m.order;
        case 'naturalknots'
            Value= invcode(m,m.knots);
        case 'numknots'
            Value = length(m.knots);
        otherwise
            [Value,Found]= get(m.localmod,Property);
            if ~Found
                try
                    Value=get(m.xreglinear,Property);
                catch
                    error(message('mbc:localtruncps:InvalidProperty', Property));
                end
            end
    end
end