Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Plotting 3-D Surface & Surface Fitting
Date: Mon, 4 Aug 2008 02:36:02 +0000 (UTC)
Organization: SDSU
Lines: 58
Message-ID: <g75pui$90r$1@fred.mathworks.com>
References: <fj46nh$cvl$1@fred.mathworks.com> <fj4h2m$ei8$1@fred.mathworks.com> <g75n6e$qf0$1@fred.mathworks.com> <g75o2h$oco$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1217817362 9243 172.30.248.37 (4 Aug 2008 02:36:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 4 Aug 2008 02:36:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1456369
Xref: news.mathworks.com comp.soft-sys.matlab:483414





> If your true goal was that equation,
> then you should fit it to your original data.

John - Thanks. Yes my true goal is the equation, but I
needed a nice graphical representation of my data too. Using
gridfit was very quick and easy to do it. 

What is the best and fastest way to model an equation 
for my data using matlab? 

Please provide me some pointers and I can read up from
there.

Thanks.




"John D'Errico" <woodchips@rochester.rr.com> wrote in
message <g75o2h$oco$1@fred.mathworks.com>...
> "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