1、Announcements,Class mailing list: send email to Hyoungjune Yi: astercs.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,Todays goals: Learn enough matlab to get started. Review some
2、 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 Suns:,Numerical,Analysis and Visualization,Matlab 6
3、.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 numbers: (1,2,3,4) Example: (x,y,z) coordinates of pt in space.,Indexing into vectors,Vector Addition
4、,v,w,V+w,Scalar Product,v,av,Operations on vectors,sum max, min, mean, sort, Pointwise: .,Inner (dot) Product,The inner product is a SCALAR!,Matrices,Sum:,A and B must have the same dimensions,Matrices,Product:,A and B must have compatible dimensions,Identity Matrix:,Matrices,Transpose:,If,A is symm
5、etric,Matrices,Determinant:,A must be square,Matrices,Inverse:,A must be square,Indexing into matrices,Euclidean transformations,2D Translation,t,P,P,2D Translation Equation,2D Translation using Matrices,P,Scaling,P,P,Scaling Equation,P,x,y,s.x,P,s.y,Rotation,P,P,Rotation Equations,Counter-clockwise
6、 rotation by an angle ,Degrees of Freedom,R is 2x2,4 elements,BUT! There is only 1 degree of freedom: ,The 4 elements must satisfy the following constraints:,Stretching Equation,P,x,y,Sx.x,P,Sy.y,Stretching = tilting and projecting (with weak perspective),Linear Transformation,SVD,Affine Transformat
7、ion,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. Well give hints in problem sets. Linear algebra allows geometric manipulation of points. Learn to love SVD.,
copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
备案/许可证编号:苏ICP备17064731号-1