Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Data Fitting to Parametric Equations
Date: Wed, 4 Nov 2009 17:48:02 +0000 (UTC)
Organization: Xoran Technologies
Lines: 25
Message-ID: <hcseoi$iab$1@fred.mathworks.com>
References: <hcs794$m3p$1@fred.mathworks.com> <hcs8fv$bi4$1@fred.mathworks.com> <hcsc67$644$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 1257356882 18763 172.30.248.37 (4 Nov 2009 17:48:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 4 Nov 2009 17:48:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1440443
Xref: news.mathworks.com comp.soft-sys.matlab:582466


"Anthony Mai" <antoniusmae@gmail.com> wrote in message <hcsc67$644$1@fred.mathworks.com>...
> This is in the documentation:
> 
> %            FMINSPLEAS assumes a model of the form:
> %            ydata = a1*f1(INLP,xdata) + a2*f2(INLP,xdata) + ...
> %            funlist is the list of functions {f1,f2,...}.
> 
> Yet, I am still quite not comprehending how to approach this using fmins, as I have 3 parametrics not a z=f(x,y),
===========

A few notes that might help:

(1)  f1, f2, etc... can be vector-valued functions in fminspleas

(2) You don't have a z=f(x,y), but you do have an X=f(theta,phi). 
In other words, instead of z,x,y you have X, theta,phi respectively. The labelling is the only real difference. 

(3) The fact that you have 3 parametrics doesn't add much complexity in this case, because all three of X, Y, Z depend on a different set of parameters. So you can really treat this as three separate surface fitting problems

X=f(theta,phi); %problem 1 - fit a surface to X
Y=g(theta,phi); %problem 2 - fit a surface to Y
Z=h(theta,phi); %problem 3 - fit a surface to Z

(4) The dependence of X on a0, a1 is purely linear. 
It's just a linear fitting. Similarly for Y.