Clear Filters
Clear Filters

Need help understanding a least squares problem

3 views (last 30 days)
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])

Accepted Answer

Matt J
Matt J on 26 Oct 2012
Edited: Matt J on 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)

More Answers (0)

Categories

Find more on Programming in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!