【正文】
welsch39。logistic39。fair39。bisquare39。WFUN39。CONST39。the LSCOV function can perform weightedleastsquare regression各點(diǎn)的重要性可能是不一樣的重度 : 即權(quán)重或者密度,統(tǒng)稱為權(quán)系數(shù) 定義加權(quán)平方誤差為29使得30由多元函數(shù)取極值的必要條件得即31引入記號(hào)定義加權(quán)內(nèi)積32矩陣形式 (法方程組 )為方程組式化為33平方誤差為作為特殊情形 ,用多項(xiàng)式作擬合函數(shù)的法方程組為34Subject:What WeightedLeastSquares Fitting capabilities are available in MATLAB () and the Toolboxes?Problem Description:Currently, the presence of data outliers can create an undesirable fit. Because the outlier lies far away from the true pattern of data, it induces error to the true fit. A workaround to this problem would be to minimize the weight(s) of such outlier(s). Solution:In MATLAB, the LSCOV function can perform weightedleastsquare regression. x = lscov(A,b,w)where w is a vector length m of real positive weights, returns the weighted least squares solution to the linear system A*x = b, that is, x minimizes (b A*x)39。, xx, yy)。xx = 5 : : 30。24矛盾方程組矛盾方程組運(yùn)用最小二乘法,要求滿足方程組的解,即求使下列值 最小的解 ,就是方程組的近似解:25矛盾方程組矛盾方程組得解:Matlab 實(shí)例實(shí)例xdata = [0 5 10 15 25]。17擬合例題擬合例題解 首先,將這些數(shù)據(jù)畫在直角坐標(biāo)系中,從圖形上 看,數(shù)據(jù)點(diǎn)的分布大致呈一條直線,所以設(shè)所求 的擬合直線為 , 得關(guān)于 a和 b的線性方程組18其他類擬合問題其他類擬合問題 最小二乘法并不只限于多項(xiàng)式,也可用于任何具體給出的函數(shù)形式。? 解:根據(jù)所給數(shù)據(jù),在直角坐標(biāo)下畫出數(shù)據(jù)點(diǎn),從圖中可以看出,各點(diǎn)在一條直線附近,故可取線性函數(shù)作為擬合曲線 1 2 3 4 5