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

    function [m,OK] = calcWeights(m,x,y)
%CALCWEIGHTS

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



% calculate the weights for an rbf, when all fit parameters are known
% assumes m.centers, m.lambda, and m.width are all filled
% and all terms are used
    

% the computation of the beta is always the same (beta = R\(Q'*y)), where
% Q and R must have been initialised appropriately in InitModel
[m,OK]= leastsq(m,x,y);