Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
a cubic fitting curve in a set of (x, y, z) data ?

Subject: a cubic fitting curve in a set of (x, y, z) data ?

From: Kuo-Hsien

Date: 21 Mar, 2013 02:03:15

Message: 1 of 4

Dear all,

I have a set of scatter data (x, y, z).

How to add a cubic fitting curve in this 3d plot?

Thanks for the hint.

Michael

Subject: a cubic fitting curve in a set of (x, y, z) data ?

From: Torsten

Date: 21 Mar, 2013 07:35:19

Message: 2 of 4

"Kuo-Hsien" wrote in message <kidpp3$440$1@newscl01ah.mathworks.com>...
> Dear all,
>
> I have a set of scatter data (x, y, z).
>
> How to add a cubic fitting curve in this 3d plot?
>
> Thanks for the hint.
>
> Michael

A curve for 3d data ?

Best wishes
Torsten.

Subject: a cubic fitting curve in a set of (x, y, z) data ?

From: Kuo-Hsien

Date: 21 Mar, 2013 18:34:05

Message: 3 of 4

"Torsten" wrote in message <kied7n$oom$1@newscl01ah.mathworks.com>...
> "Kuo-Hsien" wrote in message <kidpp3$440$1@newscl01ah.mathworks.com>...
> > Dear all,
> >
> > I have a set of scatter data (x, y, z).
> >
> > How to add a cubic fitting curve in this 3d plot?
> >
> > Thanks for the hint.
> >
> > Michael
>
> A curve for 3d data ?
>
> Best wishes
> Torsten.

Hi Torsten,

Yes. the 3d dataset looks like a narrow galaxy band (scatters) across the xyz plot. I'd like to just add a cubic fitting line to stand for this narrow band scatters.

Any ideas?


Michael

Subject: a cubic fitting curve in a set of (x, y, z) data ?

From: John D'Errico

Date: 21 Mar, 2013 21:41:06

Message: 4 of 4

"Kuo-Hsien" wrote in message <kifjqt$qq6$1@newscl01ah.mathworks.com>...
> "Torsten" wrote in message <kied7n$oom$1@newscl01ah.mathworks.com>...
> > "Kuo-Hsien" wrote in message <kidpp3$440$1@newscl01ah.mathworks.com>...
> > > Dear all,
> > >
> > > I have a set of scatter data (x, y, z).
> > >
> > > How to add a cubic fitting curve in this 3d plot?
> > >
> > > Thanks for the hint.
> > >
> > > Michael
> >
> > A curve for 3d data ?
> >
> > Best wishes
> > Torsten.
>
> Hi Torsten,
>
> Yes. the 3d dataset looks like a narrow galaxy band (scatters) across the xyz plot. I'd like to just add a cubic fitting line to stand for this narrow band scatters.
>
> Any ideas?

Essentially, it sounds like you wish to fit a "cubic" model to data
with noise in all three variables. So a cubic errors in variables
model. Not at all trivial.

Worse, a "cubic" curve makes essentially little sense anyway
in three dimensions. What model are you posing? What is a
function of what? When you say cubic, this has to mean
something in terms of mathematics.

It sounds like what you really want is some general curve that
follows through the center of your curvilinear cloud, in itself
not a trivial task either.

I'd suggest grouping your points by averaging into a relatively
few points, spaced apart. Now use a tool that can interpolate
a curve through those points in three dimensions. cscvn is
such a tool, or my own interparc from the file exchange.

John

Tags for this Thread

No tags are associated with this thread.

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.

Contact us