Path: news.mathworks.com!not-for-mail
From: "John D'Errico" <woodchips@rochester.rr.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Plotting 3-D Surface & Surface Fitting
Date: Mon, 4 Aug 2008 02:04:01 +0000 (UTC)
Organization: John D'Errico (1-3LEW5R)
Lines: 35
Message-ID: <g75o2h$oco$1@fred.mathworks.com>
References: <fj46nh$cvl$1@fred.mathworks.com> <fj4h2m$ei8$1@fred.mathworks.com> <g75n6e$qf0$1@fred.mathworks.com>
Reply-To: "John D'Errico" <woodchips@rochester.rr.com>
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 1217815441 24984 172.30.248.35 (4 Aug 2008 02:04:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 4 Aug 2008 02:04:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 869215
Xref: news.mathworks.com comp.soft-sys.matlab:483411



"Sudha` N" <sudhanatarajan@gmail.com> wrote in message 
<g75n6e$qf0$1@fred.mathworks.com>...
> 
> Hi - How do you generate the equation for z=f(x,y) from a
> surface fitting?
> I am using gridfit and have surface fitted my data
> successfully. But the key purpose of my experiment is to
> generate the equation for z as a function of x and y.

Sorry, but the surface that gridfit generates
has no simple model. There is no "equation",
besides a local, piecewise linear interpolant.
In effect, gridfit produces a variant of a low
order spline, in two dimensions.

Can you generate an equation for the surface?
Yes, you can choose to fit a model to that,
but that will require that you choose a model
form, as well as a fitting method.

If your goal was really to generate a model
expression for this surface, then gridfit was
the wrong choice for your fit. You are now
fitting a model to the approximation that
gridfit chose. So you essentially have two sets
of residuals, and two sources of lack of fit to
deal with. If your true goal was that equation,
then you should fit it to your original data.

KNOW YOUR GOALS!!! Know what it is you
need to gain from any such effort, before
you begin the process of modeling. Otherwise
you are just wasting time.

John