Re: Vandermonde Solution for Least Squares
- From: spellucci@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (Peter Spellucci)
- Date: Thu, 9 Feb 2006 11:19:39 +0000 (UTC)
In article <1139470033.970427.62210@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
"siddharth" <siddharth.vaghela@xxxxxxxxx> writes:
Hi,
is it possible to find a least squares parabolic fit for a redundant
set of sample data?
since i need a parabolic fit, my coeffs r [co c1 c2] and my sample
points range from 3 to 15 samples. is it possible to solve this by
treating X = [1 xi xi^2]size = N as a vandermonde matrix even though
the number of coeffs m < N?
in simple words, can i have a non-square matrix as a vandermonde matrix
and can i solve it using the equations mentioned in Numerical Recipes
in C (pg 90 . ch 2.8)
pls give ur suggestions as to how else i can solve this problem.
thankx,
siddharth
this is a linear least squares problem:
norm( y - X*[c0;c1;c2] , 2 ) = min_{c0,c1,c2}
with
y=[y(1);...;y(n)]
and
X=[1 x(1) x(1)^2 ; ... ; 1 x(n) x(n)^2 ]
n>=3
and at least three of the x(i) pairwise different.
you solve it in MATLAB with
c=X\y ;
and in some programming language using one of the many linear least squares
solvers
see
http://plato.la.asu.edu/topics/problems/nlolsq.html
hth
peter
.
- References:
- Vandermonde Solution for Least Squares
- From: siddharth
- Vandermonde Solution for Least Squares
- Prev by Date: Re: Solving a highly ill-conditioned linear problem
- Next by Date: Re: Solving a highly ill-conditioned linear problem
- Previous by thread: Vandermonde Solution for Least Squares
- Index(es):
Relevant Pages
|