Filter löschen
Filter löschen

Need help understanding a least squares problem

3 Ansichten (letzte 30 Tage)
Ben
Ben am 26 Okt. 2012
In this problem, you will write a function named MyRegressor to with data with n given functions.The header of this function is
function A = MyRegressor(x, y, FHs)
Here x and y are two column vectors of the same size. The relation between each element in x and its corresponding element in y can be described by y = a1 f1(x) + a2 *f2(x) + an fn(x)
f1, f2, , fn are n functions and the handles to these functions are contained in the n1 cell array FHs. You need to solve for the coecient array A by the least squares regression.
what type of solution am I solving for? unique? exact unique?
size(A)
rank(A)
rank([A b])

Akzeptierte Antwort

Matt J
Matt J am 26 Okt. 2012
Bearbeitet: Matt J am 26 Okt. 2012
Your question and the notation it uses is unclear, so I'll have to give you some abstract hints. If you have a linear system of equations
A*x=b
where A is MxN, and b is Mx1, the uniqueness of the solution is determined by rank(A).
Whether the solution is exact is related to
rank([A,b]) - rank(A)

Weitere Antworten (0)

Kategorien

Mehr zu Programming finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by