30.12.2014 Views

Lines, Curves and Surfaces in 3D

Lines, Curves and Surfaces in 3D

Lines, Curves and Surfaces in 3D

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Least Squares Fit of a L<strong>in</strong>e (Cont.)<br />

Now<br />

∂χ 2<br />

∂m = −2 ∑ (y i − mx i − c)x i = 0<br />

∂χ 2<br />

= −2 ∑ (y i − mx i − c) = 0<br />

∂c<br />

which leads to<br />

∑<br />

yi − m ∑ x i − nc = 0<br />

CM0268<br />

MATLAB<br />

DSP<br />

GRAPHICS<br />

556<br />

∑<br />

xi y i − m ∑ x 2 i − c ∑ x i = 0<br />

which can be solved for m <strong>and</strong> c to give:<br />

1<br />

m = n ∑ x i y i − ∑ ∑<br />

x i yi<br />

n ∑ x 2 i − ( ∑ x i )<br />

∑ ∑ 2<br />

yi x<br />

2<br />

c =<br />

i − ∑ ∑<br />

x i xi y i<br />

n ∑ x 2 i − ( ∑ x i ) 2<br />

◭◭<br />

◮◮<br />

◭<br />

◮<br />

Back<br />

Close

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!