05-15-2014 05:45 AM
Hi, Experts :
I have a set of data (x,y,z), and the distance of each set (x,y,z) to a centre (X0,Y0,Z0) is caluclated by
f(x,y,z)=Sqrt( (x-X0)^2 +(y-Y0)^2 +(z-Z0)^2 )
I need to find a set of (X0,Y0,Z0), which can minimise the maximum of f(x,y,z)
in Excel, I can use Solver and take Mean(x,y,z) as start values for (X0,Y0,Z0),
using GRG nonlinear Method, I can find a minimum set of (X0,Y0,Z0). see aattched zip file for data and Excel file.
is there any way I can use LabView to do the same?
could Nonlinear curve Fit be used? and how to implement?
any suggestion is more than welcome.
thanks for your time
Xiaofeng
05-15-2014 08:13 AM
Check out the Mathematics>>Optimization palette. My choice would be the Downhill Simplex, but there are several other VIs on that palette which would also work.
05-15-2014 09:27 AM
thanks for your quick reply. I did try Downhill Simplex, but could not fingure out how to setup the VI.
see my trial one. any suggestion?
05-15-2014 11:49 AM - edited 05-15-2014 11:56 AM
xgatc wrote:I have a set of data (x,y,z), and the distance of each set (x,y,z) to a centre (X0,Y0,Z0) is caluclated by
f(x,y,z)=Sqrt( (x-X0)^2 +(y-Y0)^2 +(z-Z0)^2 )
I need to find a set of (X0,Y0,Z0), which can minimise the maximum of f(x,y,z)
What do you mean by "minimize the maximum"? (There will be several maxima in the solution).
Maybe you want do fit to a sphere instead?
05-15-2014 12:10 PM
Hi,
Yes, it is actually to find minimum radius for sphere. I am using LV2012, and I could not find this call
any idea where I can get this?
many thanks.
05-15-2014 12:30 PM
05-15-2014 12:45 PM
05-15-2014 05:31 PM
HI, altenbach
you are right, the "fitting on a sphere fit.vi " is not what I am after.
thanks for the suggestion. I will have a look .