December 2016
Intermediate to advanced
332 pages
6h 2m
English
The usual way to set up an array is via a list. But there are also a couple of convenient methods for generating special arrays, which are given in the following table (Table 4.5):
|
Methods |
Shape |
Generates |
|
|
(n,m) |
Matrix filled with zeros |
|
|
(n,m) |
Matrix filled with ones |
|
|
(n,n) |
(Sub-, super-) diagonal matrix from a vector v |
|
|
(n,m) |
Matrix filled with uniformly distributed random numbers in (0,1) |
|
|
(n,) |
First n integers |
|
|
(n,) |
Vector with n equispaced points between a and b |
Table 4.5: Commands to create arrays
These commands may take additional arguments. In particular, the commands zeros, ones, and ...
Read now
Unlock full access