How to interpolate big data with small deviation?

a.gardonova
Messages
3
Reaction score
0
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
 
Physics news on Phys.org
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:
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).
 
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?
 
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.
 
There are two things I don't understand about this problem. First, when finding the nth root of a number, there should in theory be n solutions. However, the formula produces n+1 roots. Here is how. The first root is simply ##\left(r\right)^{\left(\frac{1}{n}\right)}##. Then you multiply this first root by n additional expressions given by the formula, as you go through k=0,1,...n-1. So you end up with n+1 roots, which cannot be correct. Let me illustrate what I mean. For this...
Back
Top