From the course: MATLAB 2018 Essential Training
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Perform matrix multiplication - MATLAB Tutorial
From the course: MATLAB 2018 Essential Training
Perform matrix multiplication
- [Instructor] I've switched over to MATLAB and you can see that I have a blank command window ready to go. I'll start by defining a horizontal vector, a row vector. I'll call it VEC one equal followed by a left square bracket and we'll make it the range of values from one to five. So one colon five, right square bracket and enter, and there are my values. Let's say that I want to add five to each of those numbers, and store that result in vector two. So I'll type VEC two equals VEC one plus and then the number five. Press enter and everything is recommended by five, six, seven, eight, nine, 10 and the storage in my new vector variable. We can do the same thing with a matrix. So I will create a matrix variable called MAT one equals and that's for assignment, followed by a left square bracket. We'll make the first row, the values 14 through 18. So 14 colon 18, then a semicolon to indicate that I want to start a new row, and then the values 21 colon 25 followed by a right square…
Contents
-
-
-
-
Define vectors and matrices5m 56s
-
(Locked)
Refer to matrix and vector elements3m 25s
-
(Locked)
Overview of matrix multiplication2m 56s
-
(Locked)
Perform matrix multiplication2m 14s
-
(Locked)
Perform scalar and element-wise operations on vectors and matrices6m 27s
-
(Locked)
Use vectors and matrices in a function5m 54s
-
(Locked)
Generate special matrices5m 1s
-
(Locked)
Transpose and find the inverse of matrices5m 47s
-
-
-
-
-
-