필터 지우기
필터 지우기

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 CenterFile Exchange에서 Linear Least Squares에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by