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 scalar and element-wise operations on vectors and matrices - MATLAB Tutorial
From the course: MATLAB 2018 Essential Training
Perform scalar and element-wise operations on vectors and matrices
- [Instructor] One of the most common techniques you'll use in MATLAB is matrix multiplication. Matrix multiplication is different from regular multiplication, so I'll start with an overview of the process, and then move on to performing those operations in MATLAB. I will note to start out that a vector is a specific kind of matrix, so when I say matrix multiplication, everything that I say will also apply to vectors. So let's start with vector-vector multiplication. I'll start with a row vector that has one row and three columns, and let's say that I want to multiply that by a column vector which has three rows and one column. The important thing about any kind of matrix multiplication, or with vectors is that the number of columns of the first matrix or vector, must correspond to the number of rows of the second, and you see that condition is held here. We have three columns and three rows. When I press enter, and get my value, then I'll see that the value is 32. And what happened…
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
-
-
-
-
-
-