Re: best fit 3D vector to points with a miss-distance specified
- To: mathgroup at smc.vnet.net
- Subject: [mg22814] Re: [mg22761] best fit 3D vector to points with a miss-distance specified
- From: Daniel Lichtblau <danl at wolfram.com>
- Date: Fri, 31 Mar 2000 01:01:17 -0500 (EST)
- References: <200003240828.DAA17972@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Jim Fanning wrote: > > I would like to use Mathematica to solve for a vector in three dimensions > that best fits a set of data points where the points are given by {x,y,z,r}. > Where "x,y,z" is the data point location and "r" is the miss-distance from > the data point to the vector. Any suggestions would be greatly appreciated. > > Thanks, Jim Call the data points {x[1],y[1],z[1],r[1]}, ...{x[n],y[n],z[n],r[n]}. Then you might try something like FindMinimum[ Sum[((x0-x[j])^2+(y0-y[j])^2+(z0-z[j])^2-r[j]^2)^2, {j,i,n}], {x0,0}, {y0,0}, {z0,0}] This tries to minimize total sum of squares of differences between actual distances and desired distances. Different formulations of your objective function could be used to minimize different error norms. Daniel Lichtblau Wolfram Research
- References:
- best fit 3D vector to points with a miss-distance specified
- From: "Jim Fanning" <j-squaredllc@worldnet.att.net>
- best fit 3D vector to points with a miss-distance specified