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.

Generate special matrices

Generate special matrices - MATLAB Tutorial

From the course: MATLAB 2018 Essential Training

Start my 1-month free trial

Generate special matrices

- [Instructor] Matrix operations take on many forms, some of which require special matrices that contain all zeroes, all ones, or give you the same matrix back through multiplication. In this movie I will show you how to create several types of special matrices. I'm in MATLAB and I have a blank command window. The first type of special matrix that I will show you how to create is a zeroes matrix. And as the name implies, this is the matrix that contains zeroes for each of its values. You can use these matrices as initialization points for example, neural network nodes. You can assign a weight to each one. To create a zeroes matrix that is square you only need to pass one argument and that is the number of rows and columns. The keyword or function is zeroes, then a left parenthesis and the number of rows and columns. So if you wanted to do a four by four, you just type a four within parenthesis and enter, and you get a four by four. Now note that I am not assigning this to any…

Contents