Effacer les filtres
Effacer les filtres

Need help understanding a least squares problem

3 vues (au cours des 30 derniers jours)
Ben
Ben le 26 Oct 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])

Réponse acceptée

Matt J
Matt J le 26 Oct 2012
Modifié(e) : Matt J le 26 Oct 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)

Plus de réponses (0)

Catégories

En savoir plus sur Programming dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by