# 3d data fit

How to fit 3d data of two variables.

add a comment

3d data fit

How to fit 3d data of two variables.

add a comment

0

One option is to use `find_fit`

.

Here is some sample code.

```
# example data
f(x,y) = x^2+y^2
data=[]
for i in range(0,10):
for j in range(0,10):
data.append([i,j,f(i,j)])
# do the fitting
var('a b c')
model(x,y)=a*x^2+b*x*y+c*y^2
find_fit(data,model)
```

Asked: **
2015-05-11 14:58:00 -0600
**

Seen: **54 times**

Last updated: **May 12 '15**

Plot intersections of two relations

How to export a 3D plot to a jpg/png file (OSX)

How I can plot functions of the kind $f:\Bbb R\to\Bbb C$ in 3D properly?

can I create isosurface contours from list data?

canvas3d plot does not change.

find best fit for implicit equation.

How to save a 3d plot from sage cell

Detecting extrema and asymptotes of (nasty) functions of two variables

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.