Clear Filters
Clear Filters

Fitting a 3D parametric line to 3D data

1 view (last 30 days)
Pal
Pal on 22 Jul 2013
Hi,
Suppose I have data of 3D points in the form of 3 n by 1 vectors, X, Y and Z. I'd like to least-squares fit a 3D line to this data in the form of
|x = x0 + a .* t
y = y0 + b .* t
z = z0 + 0 .* t|
I.e, I'd like to constrain z to be constant and obtain x0, y0, z0, a and b. The formulation may be different, as long as z remains constrained.
Is there a quick way to do this without the curve fitting and statistics toolboxes?
Many thanks.

Answers (0)

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!