From the course: Mathematica 11 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 useful matrices - Mathematica Tutorial
From the course: Mathematica 11 Essential Training
Generate useful matrices
- [Instructor] For some machine learning and other applications, you'll find it useful to create specific matrices. For example, a matrix that contains only the number zero, another that contains only the number one, or a matrix that has the number one from the top left to the bottom right diagonal in a square matrix. In this movie, I will show you how to create each of those matrices in Mathematica. I have created a blank Mathematica notebook, and I can run through the commands of creating the three different types of matrices that I described. The first is a matrix that consists entirely of ones. To create that, I need to use the constant array keyword. So I'll type ConstantArray. The A at the beginning of array is capitalized. Now enter a left square bracket to start my argument list. I want the constant in the array to be the number one; so I'll type one, then a comma. Now I need to enter in a list to identify the dimensions of the matrix, that is the number of rows and columns…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
(Locked)
Define vectors and matrices4m 22s
-
(Locked)
Add, subtract, and multiply matrices9m 9s
-
(Locked)
Generate useful matrices3m 28s
-
(Locked)
Transpose and invert matrices6m 16s
-
(Locked)
Perform element-wise calculations3m 58s
-
(Locked)
Refer to and edit matrix items4m 54s
-
(Locked)
Convert a matrix to a list2m 50s
-
(Locked)
-
-
-
-