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

    function beta = calcBeta(m)
%CALCBETA calculate the beta coefficients from the information in the store
%
% beta = calcBeta(m)
% 
% See also LEASTSQ

% Copyright 2005 The MathWorks, Inc. and Ford Global Technologies, Inc.

Store = get(m, 'Store');
beta =  zeros(size(Store.X,2),1);
% pad y
y = [Store.y; zeros(size(Store.Q,1) - size(Store.X,1),1)];
beta(Terms(m)) = Store.R\(Store.Q'*y);