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

Perform scalar and element-wise operations on vectors and matrices - MATLAB Tutorial

From the course: MATLAB 2018 Essential Training

Start my 1-month free trial

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