ENGR 121 Lecture Notes - Lecture 1: Row And Column Vectors, Matlab, Dot Product

36 views3 pages

Document Summary

Summary of lecture: how to classify, categorize, modify and conduct operations using matrices and vectors in matlab (which stands for matrix laboratory) Matrix: stores a set of values of the same type. >> m=[ 1,4,6; 7,8,10; 2,7,15; 3,7,8] becomes a 4x3 matrix. ; indicates the end of a row. Matlab will show an error if your elements and the size of the matrix don"t add up. >>z=10*rand(3,5) becomes a 3x5 matrix with random numbers from (0,10) >>z(1,2) refers to row 1, column 2 element. >>z(2,:) refers to all elements in row 2. >>z(:,2) refers to all elements in column 2. >>z([1,3], end) refers to 1st and 3rd row elements of the last column. In a (n x m) and b (n x m), in order to multiply a*b, m=n. X. ^(a) raises each element in matrix x by the power of a. **these functions only work for 0s and 1s (there"s no sixes(n,m) function)

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents