Thread Subject: Data Fitting to Parametric Equations

Subject: Data Fitting to Parametric Equations

From: Anthony Mai

Date: 4 Nov, 2009 15:40:20

Message: 1 of 4

Hello all,
I have a data set of (x,y,z) Cartesian values, and the following parametric equations for a skewed tear-dropped ellipsoid:
X=a0+a1*cos(theta)*sin(phi)
Y=b0+b1*sin(phi)*sin(theta)
Z=c0+c1*cos(phi)*exp(d0*phi)
theta=(0:2*pi)
phi=(0:pi)
Is there any way possible to determine these parameters a0, a1, etc.? I have attempted to google every link regarding at surface fitting and have come up empty handed. These equations are weird in that it's in parametric and it's in 3d. The equations are for experimental data obtained from testing antennae strengths. Possibly it could be some type of spheroid also, but again same complexity of equations. Also maybe I could try using the implicit equation instead of using parametric? With that regard I tried finding some implicit data fitting methods and again nothing. Any help or points in some direction would greatly help. Thanks!

Anthony

Subject: Data Fitting to Parametric Equations

From: Matt

Date: 4 Nov, 2009 16:01:03

Message: 2 of 4

"Anthony Mai" <antoniusmae@gmail.com> wrote in message <hcs794$m3p$1@fred.mathworks.com>...
> Hello all,
> I have a data set of (x,y,z) Cartesian values, and the following parametric equations for a skewed tear-dropped ellipsoid:
> X=a0+a1*cos(theta)*sin(phi)
> Y=b0+b1*sin(phi)*sin(theta)
> Z=c0+c1*cos(phi)*exp(d0*phi)
> theta=(0:2*pi)
> phi=(0:pi)
> Is there any way possible to determine these parameters a0, a1, etc.? I have attempted to google every link regarding at surface fitting and have come up empty handed. These equations are weird in that it's in parametric and it's in 3d. The equations are for experimental data obtained from testing antennae strengths. Possibly it could be some type of spheroid also, but again same complexity of equations. Also maybe I could try using the implicit equation instead of using parametric? With that regard I tried finding some implicit data fitting methods and again nothing. Any help or points in some direction would greatly help. Thanks!
------

Doesn't seem weird to me. It's almost a linear fitting problem, apart from the parameter d0, which is your only intrinisically non-linear parameter. Check the file exchange for the function fminspleas()

Subject: Data Fitting to Parametric Equations

From: Anthony Mai

Date: 4 Nov, 2009 17:04:07

Message: 3 of 4

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), or some ydata = ... I am still a novice at this and wish to find out how to utilize the inputs of "xdata", "ydata" given cartesian data. Thanks for helping!

Anthony

"Matt " <xys@whatever.com> wrote in message <hcs8fv$bi4$1@fred.mathworks.com>...

> Doesn't seem weird to me. It's almost a linear fitting problem, apart from the parameter d0, which is your only intrinisically non-linear parameter. Check the file exchange for the function fminspleas()

Subject: Data Fitting to Parametric Equations

From: Matt

Date: 4 Nov, 2009 17:48:02

Message: 4 of 4

"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.

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
data fitting Anthony Mai 4 Nov, 2009 10:44:04
parametric Anthony Mai 4 Nov, 2009 10:44:04
3d fitting Anthony Mai 4 Nov, 2009 10:44:04
rssFeed for this Thread

Contact us at files@mathworks.com