Borrar filtros
Borrar filtros

Need help understanding a least squares problem

3 visualizaciones (últimos 30 días)
Ben
Ben el 26 de Oct. de 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])

Respuesta aceptada

Matt J
Matt J el 26 de Oct. de 2012
Editada: Matt J el 26 de Oct. de 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)

Más respuestas (0)

Categorías

Más información sobre Programming en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by