# How to interpolate big data with small deviation?

1. May 25, 2013

### a.gardonova

Hi,
I've got a problem. There is over 9 milions points in my .txt. I have to find polynom for surface of this points with deviation smaller then 0.01 (x [-3:3], y[-3,3], z [-9,9]).
I try many functions in Matlab, but no answer.
Thank for help.
B
1. The problem statement, all variables and given/known data

2. Relevant equations

3. The attempt at a solution

2. May 25, 2013

### Staff: Mentor

Which functions did you try in Matlab? Did you used a fit to determine the prefactors in your polynomials?
Did you consider terms like x*y, x^2*y^4*z and similar? They might be required to approximate your data with a polynomial.

Last edited: May 25, 2013
3. May 25, 2013

### a.gardonova

Hi,
main wasthis:
m=[0 0 ; 1 0 ;0 1;2 0;2 1; 2 2 ;0 2;1 2; 3 0; 3 1;3 2; 3 3; 0 3;1 3; 2 3];
coeff=least_square_polyfit_xyz(x,y,z,m);
m are combinations of using x and y () so it will make a + b*x + c*y +d*x^2....
bud there are very big diferences between defined z and computed z. The proble is, that my surface is only little curved plane, but there are 2 singularities (ist surface with volcanos).

4. May 25, 2013

### Staff: Mentor

Ah, it is just f(x,y)=z
Do you have to use a polynomial?

11 is missing in your list.

Is there any visible symmetry?
What about terms of 4th order?

5. May 25, 2013

### a.gardonova

I repair script, but there is no improve.
This is the source of data, if you can try it. There is no symetry, so I don't know how to do this.
http://m37.fsv.cvut.cz/nm/data.txt
I've tried also 4th order, but also no improve.