COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### Curve fit to 3D data

• Follow

```All,
what is a simply method to fit a curve to a 3D set of points (no function!) which are stored in a matrix where rows are the individual points and columns the x,y,z coordinates?

My objective is to find a best fit (least square error) curve to match the points in my matrix and then plot the points using scatter3 and the fit curve in one plot.

Is this possible and how can I achieve this in MATLAB?

Thx.
```
 0

```"Thomas " <spalek@yamakasis.de> wrote in message <idl755\$o5h\$1@fred.mathworks.com>...
> All,
> what is a simply method to fit a curve to a 3D set of points (no function!) which are stored in a matrix where rows are the individual points and columns the x,y,z coordinates?
======

What kind of curve?
```
 0

```
"Thomas " <spalek@yamakasis.de> wrote in message
news:idl755\$o5h\$1@fred.mathworks.com...
> All,
> what is a simply method to fit a curve to a 3D set of points (no
> function!) which are stored in a matrix where rows are the individual
> points and columns the x,y,z coordinates?
>
> My objective is to find a best fit (least square error) curve to match the
> points in my matrix and then plot the points using scatter3 and the fit
> curve in one plot.
>
> Is this possible and how can I achieve this in MATLAB?

http://www.mathworks.com/support/tech-notes/1500/1508.html

--
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlab.wikia.com/wiki/FAQ
http://www.mathworks.com

```
 0

```Thanks Steven,
but how can I plat my 3d data in a scatter3 plot and fit the points with a spline in the same plot? I can fit a surface using the sftool but this is not what I wanted to do. My points lie on a trajectory which is a 3d pareto front.

"Steven_Lord" <slord@mathworks.com> wrote in message <idlhg1\$a8v\$1@fred.mathworks.com>...
>
>
> "Thomas " <spalek@yamakasis.de> wrote in message
> news:idl755\$o5h\$1@fred.mathworks.com...
> > All,
> > what is a simply method to fit a curve to a 3D set of points (no
> > function!) which are stored in a matrix where rows are the individual
> > points and columns the x,y,z coordinates?
> >
> > My objective is to find a best fit (least square error) curve to match the
> > points in my matrix and then plot the points using scatter3 and the fit
> > curve in one plot.
> >
> > Is this possible and how can I achieve this in MATLAB?
>
> http://www.mathworks.com/support/tech-notes/1500/1508.html
>
> --
> Steve Lord
> slord@mathworks.com
> comp.soft-sys.matlab (CSSM) FAQ: http://matlab.wikia.com/wiki/FAQ
> http://www.mathworks.com
```
 0

3 Replies
541 Views

Similiar Articles:

7/24/2012 9:38:00 PM