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

Perform matrix multiplication - MATLAB Tutorial

From the course: MATLAB 2018 Essential Training

Start my 1-month free trial

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