Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: determining the equation of a 3-D surface
Date: Fri, 21 Nov 2008 20:38:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 21
Message-ID: <gg7679$i6v$1@fred.mathworks.com>
References: <gg6ovh$4db$1@fred.mathworks.com> <gg6s8i$4mr$1@fred.mathworks.com> <gg71op$4c1$1@fred.mathworks.com> <gg7322$p7o$1@fred.mathworks.com> <gg73kq$53o$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1227299881 18655 172.30.248.35 (21 Nov 2008 20:38:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 21 Nov 2008 20:38:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1611585
Xref: news.mathworks.com comp.soft-sys.matlab:502406


"Johan Carlson" <Johan.E.Carlson@gmail.com> wrote in message <gg73kq$53o$1@fred.mathworks.com>...

Your code is very great for minimizing the total sum of squared distances to my measured data but this is not really the solution to my problem..

Maybe I should explain more..
I am working on calibrating a probe and data is taken in 169 points in a plane x by y where x is between -36 to 36 by a 6 degree step and the same for y.

By measuring data in these points, a calculation using data discrete values give me a z value for each point.
So 169 values in my grid.
These 169 values define my surface, there is no noise, it is a physical shape surface of the probe's sensitivity.
The goal is to minimize this value and get the position (x,y) associated with.
For this I can interpolate easily my data values in other points of the grid by interp2 but what I need is using fmincon for get a minimum in a optimized way.

And fmincon seems to work only with analytical expression function and not with
evaluated values of a variable.

I know that I could use min(min(MYmatrix) but the final purpose is to get accuracy on x and y about 0.1 for a great number of samples. So a basic search like min(min(..)) will be too lomg.

So I definitively need to use a powerful minimizer like fmincon.