MathGroup Archive 2003

[Date Index] [Thread Index] [Author Index]

Search the Archive

Mathematica and polynomial surface fitting...

  • To: mathgroup at smc.vnet.net
  • Subject: [mg40891] Mathematica and polynomial surface fitting...
  • From: fab at soda.csua.berkeley.edu (Fabio Rojas)
  • Date: Wed, 23 Apr 2003 01:17:56 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Here is my problem - can mathematica do it? Math is easy, but
finding software that produces easy to manipulate data is the issue...

1. The Data: Three columns vectors - X coords, Y coords and Z coords - 
the data you need to do a surface plot.

2. Find the best polynomial fit f(X,Y)=Z of degree less than N.

3. Create new colums vectors that 

	(a) report the coefficients and powers of each pure and mixed term;

	(b) create some new columns telling me which terms I used- so I can
	tell if it was X rather than XY that was used                

In other words, augment [X|Y|Z] --> [X|Y|Z|Coeffs|powers]

4. Repeat this procedure many times - do the poly fit for same (X,Y) grid
but different Z values. Thus, I need an easy to manipulate output. 

________________________________________________________________

Of course, lots of software can do poly fits, but few packages will give me
what I need for step 3 -  a nice vector/list that I can attach to each
version of the grid. 

For example, Stata will do a polynomial fit, with logarithms you can't remove,
but it produces a confusing list of numbers (you can't tell the difference
between x^2 and X^2*log(x) - they are coded as "2 2" - annoying!). Other 
data software will print on the screen the poly eqn, but you can't
attach it to your data. No object is produced that is easy to access. 

So can mathematica help me with my problem? Please, let the answer be yes...

Fabio 


  • Prev by Date: combine a list of lists with another list of lists
  • Next by Date: Re: small program in Mathematica
  • Previous by thread: RE: combine a list of lists with another list of lists
  • Next by thread: How to examine x=(x+a)/b