Announcements

Please download to get full document.

View again

of 35
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Information Report
Category:

Math & Engineering

Published:

Views: 0 | Pages: 35

Extension: PDF | Download: 0

Share
Related documents
Description
Announcements ã Class mailing list: send email to Hyoungjune Yi: aster@cs.umd.edu ã Homework at the end of class. ã Text is on reserve in the CS library.…
Transcript
Announcements ã Class mailing list: send email to Hyoungjune Yi: aster@cs.umd.edu ã Homework at the end of class. ã Text is on reserve in the CS library. ã Powerpoint should be available by 10am class day. Matlab tutorial and Linear Algebra Review ã Today’s goals: ã Learn enough matlab to get started. ã Review some basics of Linear Algebra ã Essential for geometry of points and lines. ã But also, all math is linear algebra. ã (ok slight exaggeration). ã Many slides today adapted from Octavia Camps, Penn State. Starting Matlab ã For PCs, Matlab should be a program. ã For Sun’s: Numerical Analysis and Visualization Matlab 6.1 Help ã help ã help command Eg., help plus ã Help on toolbar ã demo ã Tutorial: http://amath.colorado.edu/scico/tutorials /matlab/ Matlab interpreter ã Many common functions: see help ops Vectors ã Ordered set of v  ( x1 , x2 ,  , xn ) numbers: (1,2,3,4)  n 2 v x ã Example: (x,y,z) i 1 i coordinates of pt in space. If v  1, v is a unit vecto r Indexing into vectors Vector Addition v  w  ( x1 , x2 )  ( y1 , y2 )  ( x1  y1 , x2  y2 ) V+w v w Scalar Product av  a( x1 , x2 )  (ax1 , ax2 ) av v Operations on vectors ã sum ã max, min, mean, sort, … ã Pointwise: .^ Inner (dot) Product v  w v.w  ( x1 , x2 ).( y1 , y2 )  x1 y1  x2 . y2 The inner product is a SCALAR! v.w  ( x1 , x2 ).( y1 , y2 ) || v ||  || w || cos v.w  0  v  w Matrices  a11 a12  a1m  a  a2 m  Sum:  21 a22 Cnm  Anm  Bnm Anm  a31 a32  a3m          cij  aij  bij an1 an 2  anm  A and B must have the same dimensions Matrices Product: A and B must have Cn p  Anm Bm p compatible dimensions m cij   aik bkj k 1 Ann Bnn  Bnn Ann 1 0  0 Identity Matrix:    0 1  0 I  IA  AI  A       0 0  1 Matrices Transpose: Cmn  A nm T ( A  B)  A  B T T T cij  a ji ( AB)  B A T T T If AT  A A is symmetric Matrices Determinant: A must be square  a11 a12  a11 a12 det     a11a22  a21a12 a21 a22  a21 a22  a11 a12 a13  det a21 a22  a22 a23 a21 a23 a21 a22 a23   a11  a12  a13 a32 a33 a31 a33 a31 a32 a31 a32  a33  Matrices Inverse: A must be square 1 1 Ann A nn A nn Ann  I 1  a11 a12  1  a22  a12  a    a   21 a 22  a11a22  a21a12  21 a11  Indexing into matrices Euclidean transformations 2D Translation P’ t P 2D Translation Equation P’ t ty P P  ( x, y ) y t  (t x , t y ) x tx P'  ( x  t x , y  t y )  Pt 2D Translation using Matrices P’ P  ( x, y ) t ty P t  (t x , t y ) y t P x tx  x  x  t x  1 0 t x    P'       y  y  t y  0 1 t y   1    Scaling P’ P Scaling Equation P’ s.y P  ( x, y ) P P'  ( sx, sy ) y P'  s  P x s.x  sx   s 0  x  P'         sy  0 s   y  P'  S  P S Rotation P P’ Rotation Equations Counter-clockwise rotation by an angle   x' cos  sin    x  P’  y '   sin    cos   y   Y’     P y P'  R.P x X’ Degrees of Freedom  x' cos  sin    x   y '   sin    cos   y      R is 2x2 4 elements BUT! There is only 1 degree of freedom:  The 4 elements must satisfy the following constraints: R  RT  RT  R  I det( R )  1 Stretching Equation P  ( x, y ) P’ P '  ( s x x, s y y ) Sy.y P  sx x  sx 0   x P'        y s y 0 sy   y  y   x Sx.x S P'  S  P Stretching = tilting and projecting (with weak perspective)  sx   sx x  sx 0   x s 0  x  P'          s y   y  y  y s s y 0   y    y  0 1 Linear Transformation a b   x  P'     c d   y SVD  sin  cos   s x 0  sin  cos    x   0    cos  sin    s y  cos   sin    y   sx   sin  cos   0  sin  cos    x   sy    sin    y  sy  cos sin      cos   0 1 Affine Transformation  x a b tx   P'    y    c d ty  1    Files Functions ã Format: function o = test(x,y) ã Name function and file the same. ã Only first function in file is visible outside the file. Images Debugging ã Add print statements to function by leaving off ; ã keyboard ã debug and breakpoint Conclusions ã Quick tour of matlab, you should teach yourself the rest. We’ll give hints in problem sets. ã Linear algebra allows geometric manipulation of points. ã Learn to love SVD.
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks
SAVE OUR EARTH

We need your sign to support Project to invent "SMART AND CONTROLLABLE REFLECTIVE BALLOONS" to cover the Sun and Save Our Earth.

More details...

Sign Now!

We are very appreciated for your Prompt Action!

x