フィルターのクリア

HOW CA I WRITE A OLS CODE FOR THIS FUNCTION?

2 ビュー (過去 30 日間)
Ashwaq
Ashwaq 2012 年 5 月 11 日
Using the OLS regression I want to minimize the sum of square residual? How can I do it in matlab P=CD*+error Such as P is a Kx1 matrix and C kxn matrix and D*is a kx1 matrix and the error is a Kx1 matrix And D*=exp(-r(tn)*tn) and I want to get the r(tn) which should be a Kx1 matrix ,t =1,2,….n D=arg {min}_(D*) {ε'ε|ε=P-CD*} And D=((C' C))^(-1) C' P COULD SOME BODY SUGGEST A SOLUTION?PLEASE

回答 (1 件)

Sargondjani
Sargondjani 2012 年 5 月 11 日
there are many tools. have a look at them (for some you need specific toolboxes):
\ (left divide) regress
curvefit
lsqlin (linear least squares) lsqnonlin (non linear least squares)
for more specific problems: fminunc (unconstrained optimization) fmincon (constrained optimization)

カテゴリ

Help Center および File ExchangeLinear Least Squares についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by