Ask Your Question
0

3d data fit

asked 2015-05-11 14:58:00 -0600

mkr gravatar image

updated 2015-05-11 18:13:35 -0600

How to fit 3d data of two variables.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-05-12 07:23:24 -0600

calc314 gravatar image

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)
edit flag offensive delete link more

Comments

Thank you.

mkr gravatar imagemkr ( 2015-05-12 09:34:25 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

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

Seen: 54 times

Last updated: May 12 '15