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:17:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 27
Message-ID: <gg74vt$r4j$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> <gg73iu$44n$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 1227298621 27795 172.30.248.35 (21 Nov 2008 20:17:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 21 Nov 2008 20:17:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1611585
Xref: news.mathworks.com comp.soft-sys.matlab:502401


"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <gg73iu$44n$1@fred.mathworks.com>...
> "loic paccard" <loic.paccard@ecam.fr> wrote in message <gg7322$p7o$1@fred.mathworks.com>...
> 
> > Maybe I am wrong, in this case tell me how to use interp2 in order to get this analytical equation z= f(x,y).
> 
> I don't think minimizer require an analytic expression. All it needs is you will be able to evaluate a function - preferable continuously derivable - at any point.
> 
> And that is exactly interp2 with spline function can give you.
> 
> Otherwise you have to give up the fact that the model (could be an analytic expression) interpolate the data, but only *approximate* your data. In this case you might call a fitting with multi-variate polynomial, or spline functions.
> 
> Bruno

Bruno,

What I need is minimizing my z values and the best minimizer would be obviously
fmincon in my case.
I have looked for finding a way to use fmincon without an analytical expression but just function evaluations (by using interp2 I can have much more evaluations of my functions in the grid from my real data).

But fmincon seems to requires an analytical expression whatever:

Find minimum of constrained nonlinear multivariable function
Equation

Finds the minimum of a problem specified by

x, b, beq, lb, and ub are vectors, A and Aeq are matrices, c(x) and ceq(x) are functions that return vectors, and f(x) is a function that returns a scalar. f(x), c(x), and ceq(x) can be nonlinear functions.