Register to reply

Create 3d function with a set of points

by CjStaal
Tags: function, points
Share this thread:
CjStaal
#1
Nov14-12, 11:25 PM
P: 7
I'm creating a computer program and I need to see what's most efficient. I need another program [lol] that I can input 3d points in and have it create the function.
the points are this v e t
100 500 3
300 3000 28
500 1000 3
1000 5000 45
1000 10000 330
Phys.Org News Partner Science news on Phys.org
An interesting glimpse into how future state-of-the-art electronics might work
Tissue regeneration using anti-inflammatory nanomolecules
C2D2 fighting corrosion
Simon Bridge
#2
Nov14-12, 11:44 PM
Homework
Sci Advisor
HW Helper
Thanks
Simon Bridge's Avatar
P: 12,794
Cannot be done unless you know what sort of function to expect.
CjStaal
#3
Nov14-12, 11:49 PM
P: 7
I can get much more points if that's what it needs. Pretty much I need to be able to put in v and e and get t out of it

CjStaal
#4
Nov15-12, 12:02 AM
P: 7
Create 3d function with a set of points

I think matlab can do it http://www.mathworks.fr/matlabcentral/fileexchange/8998
Simon Bridge
#5
Nov15-12, 12:23 AM
Homework
Sci Advisor
HW Helper
Thanks
Simon Bridge's Avatar
P: 12,794
Off your first post - you have a bunch of data points which are from some function f(x,y,z) right? You have asked for a program to recover the equation of f(x,y,z) from the set of ordered triples {(xi,yi,zi)}. The problem is that f(x,y,z) can be anything.

Look at the simpler example in 2D ... if I have ordered pairs {(1,1),(2,1),(3,1),...} we could say that the curve is y=1 ... but it could also be y=cos(kx): k=2pi, so which is it? There are an infinite number of possible cosine curves.... then there are other periodic functions ... and, in this case, there are infinite data points. If there were finite data points, then I could also fit polynomials. Then there are all the possible irregular functions, peicewise functions and on and on and on. In 3D f(x,y,z) could even loop back on itself.

Programs like matlab have built-in assumptions that they use to do interpolation - they do not, in general, find the equation of the generating function.
gridfit, your example, for instance, assumes the data corresponds to a surface z=f(x,y)... and makes assumptions about the nature of the surface.

For the 2D case I could use the polyfit function - but I have to also input the order of the polynomial I want to fit.
HallsofIvy
#6
Nov15-12, 07:11 AM
Math
Emeritus
Sci Advisor
Thanks
PF Gold
P: 39,510
Given any finite number of points, there exist an infinite number of functions that give those points. In fact, given n points, there exist an infinite number of polynomials of degree n that give those points.
CjStaal
#7
Nov15-12, 05:59 PM
P: 7
Well its more t=f(v,e)
haruspex
#8
Nov15-12, 08:08 PM
Homework
Sci Advisor
HW Helper
Thanks
P: 9,816
Quote Quote by CjStaal View Post
Well its more t=f(v,e)
Doesn't help.
Basing a mathematical model purely on datapoints, without reference to the underlying physics (or whatever), is an exercise in numerology. In any real environment you should have some preconception of the relationship, even if it is only smoothness and asymptotic behaviour.
In most cases, a first order approximation (over a limited range of values) will be a linear fit. Standard regression tools will allow you to get the best such fit to the data. But beware of trying to extrapolate beyond the range of datapoints unless you have information regarding asymptotes.
Beyond that, smoothness assumptions could justify the use of splines, etc. You should avoid feeding in more arbitrary constants to achieve the fit than are justified by the number of datapoints and their precision. There are standard tests for that. G--gle parameter estimation model chi-square.


Register to reply

Related Discussions
Piecewise function - create function from graph Precalculus Mathematics Homework 8
Need to create a function in Precalc... Precalculus Mathematics Homework 4
Create a rational function with the following properties Precalculus Mathematics Homework 1
Create a function in MATLAB! Math & Science Software 4
Determining a function given points and the values of derivatives at points Calculus & Beyond Homework 16