# Polynomial fitting

 Register Blogs Members List Search Today's Posts Mark Forums Read

 August 9, 2012, 10:52 Polynomial fitting #1 Senior Member   Join Date: May 2012 Posts: 115 Rep Power: 5 Hello, I am fitting polynomials of different degree to some data points. p(x,y) = a + bx + cy Question: If I fit the above polynomial to 3 points then I might get a singular matrix when I try to solve the system (e.g. if the points are located on the same axis). What is the rule here in order to Not get a singular matrix? I wish to fit an arbitrary number of points to a polynomial of higher order and while the above case is simple to figure out I believe I lack the understanding to avoid singular matrices (some times it might work and other times it might not) when doing this. Regards

 August 9, 2012, 17:58 #2 Senior Member     Paolo Lampitella Join Date: Mar 2009 Location: Italy Posts: 534 Blog Entries: 14 Rep Power: 17 In 2D (x and y) and a polynomial whose maximum order is n the requirement is that no more than n+1 points are aligned. In 3D (x, y and z) you also have the requirement that no more than (n+1)*(n+2)/2 points can be on the same plane. That's all i remember, but i guess there is some material around on the multi-dimensional polynomial interpolation. As a side note, consider that for any valid point distribution you can always find a non valid one in the way of exchanging the position of just two points. Indeed, this operation has the effect of exchanging two rows in the interpolation matrix hence, as this imply a change in the sign of the determinant, somewhere along the path the determinant has become 0. Simbelmynė likes this.

 August 10, 2012, 03:33 #3 Senior Member   Join Date: May 2012 Posts: 115 Rep Power: 5 Thank you, this was helpful! By alignment, I assume that you also include diagonal alignment, right?

 August 10, 2012, 05:35 #4 Senior Member     Paolo Lampitella Join Date: Mar 2009 Location: Italy Posts: 534 Blog Entries: 14 Rep Power: 17 Yes, alignment in any direction (2D of course).

 August 10, 2012, 11:41 #5 Senior Member   Filippo Maria Denaro Join Date: Jul 2010 Posts: 1,663 Rep Power: 23 if you use Lagrangian simplex (triangles in 2D, tethraedron in 3D), you will be sure that the matrix is never singula

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post vemps OpenFOAM 0 June 30, 2011 10:13 vemps OpenFOAM 0 June 28, 2011 10:22 jason.ryon OpenFOAM 2 May 11, 2011 06:16 navid STAR-CD 2 April 19, 2010 05:00 Craig FLUENT 1 April 24, 2008 17:06

All times are GMT -4. The time now is 11:54.