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.
Perform element-wise calculations - Mathematica Tutorial
From the course: Mathematica 11 Essential Training
Perform element-wise calculations
- [Instructor] Earlier in this chapter, I showed you how to perform matrix multiplication. In this movie, I would like to show you how to perform element wise calculations. Remember that matrix multiplication requires that the first matrix have a number of columns that is equal to the number of rows in the second matrix. That means the matrices can be of different shapes. If you want to perform an element wise calculation, then you can multiply the values of one matrix with the values of another, but in this case, the matrices need to be the same shape. I have opened a blank Mathematica notebook, so I need to enter in a couple of matrices. I'll assign the first one to the variable mat3, followed by the equal sign. To enter it in visually as opposed to a list of lists, I'll go to the insert menu, point to table matrix, and click new. I'll make this a two by three matrix, that is with two rows and three columns, so I'll make sure make sure that the matrix option is selected, and I'll…
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)
-
-
-
-