Download presentation
Presentation is loading. Please wait.
Published byPeregrine Shelton Modified over 9 years ago
1
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.
2
Vectors Ordered set of numbers: (1,2,3,4) Example: (x,y,z) coordinates of pt in space.
3
Vector Addition v w V+w
4
Scalar Product v av
5
Operations on vectors sum max, min, mean, sort, … Pointwise:.^
6
Inner (dot) Product v w The inner product is a SCALAR!
7
Matrices Sum: A and B must have the same dimensions
8
Matrices Product: A and B must have compatible dimensions Identity Matrix:
9
Matrices Transpose: If A is symmetric
10
Matrices Determinant: A must be square
11
Matrices Inverse: A must be square
12
Indexing into matrices
13
Euclidean transformations
14
2D Translation t P P’
15
2D Translation Equation P x y txtxtxtx tytytyty P’ t
16
2D Translation using Matrices P x y txtxtxtx tytytyty P’ t tP
17
Scaling P P’
18
Scaling Equation P x y s.x P’ s.y
19
Rotation P P’
20
Rotation Equations Counter-clockwise rotation by an angle P x Y’ P’ X’ y
21
Degrees of Freedom R is 2x2 4 elements BUT! There is only 1 degree of freedom: The 4 elements must satisfy the following constraints:
22
Stretching Equation P x y S x.x P’ S y.y
23
Stretching = tilting and projecting (with weak perspective)
24
Linear Transformation SVD
25
Affine Transformation
26
Files
27
Functions Format: function o = test(x,y) Name function and file the same. Only first function in file is visible outside the file.
28
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.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.