Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: determining the equation of a 3-D surface
Date: Fri, 21 Nov 2008 16:52:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 17
Message-ID: <gg6ovh$4db$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 1227286321 4523 172.30.248.35 (21 Nov 2008 16:52:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 21 Nov 2008 16:52:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1611585
Xref: news.mathworks.com comp.soft-sys.matlab:502341


Hi everybody,

I collect some data in this way:
13 positions x (discrete points: values from -36 to 36 by a 6 step)
13 positions y (discrete points: values from -36 to 36 by a 6 step)
basically it is a grid of 169 points
And each point has a z-value that I am trying to minimize.

I can plot a surface z=f(x,y) but I need to minimize it for several samples.
So the best minimizer would be fmincon in my case but how I can get an equation z=f(x,y) from 169 discrete points??

I want to say that using griddata is helpless in my case, I do not need to interpolate but to be able to use fmincon for my discrete values.

I have looked for hours and it does not seem like fmincon can use directly elements values in matrix referenced by row and column as a function AND there is no function able to get a 3-D equation in my case.

I will be glad to receive some help,
loic.