Create a matrix by reading from a text file, e.g., a CSV file.
Create a matrix by reading from a text file, e.g., a CSV file.
the name of file holding the data
the character separating the values
Create an n-by-n identity matrix (ones on main diagonal, zeros elsewhere).
Create an n-by-n identity matrix (ones on main diagonal, zeros elsewhere).
the dimension of the square matrix
Show the flaw by printing the error message.
Show the flaw by printing the error message.
the method where the error occurred
the error message
Form a matrix from a vector and a scalar, column-wise.
Form a matrix from a vector and a scalar, column-wise.
the first vector -> column 0
the second scalar -> column 1 (repeat scalar)
Form a matrix from a scalar and a vector, column-wise.
Form a matrix from a scalar and a vector, column-wise.
the first scalar -> column 0 (repeat scalar)
the second vector -> column 1
Form a matrix from two vectors, column-wise.
Form a matrix from two vectors, column-wise.
the first vector -> column 0
the second vector -> column 1
Form a matrix from a vector and a scalar, row-wise.
Form a matrix from a vector and a scalar, row-wise.
the first vector -> row 0
the second scalar -> row 1 (repeat scalar)
Form a matrix from scalar and a vector, row-wise.
Form a matrix from scalar and a vector, row-wise.
the first scalar -> row 0 (repeat scalar)
the second vector -> row 1
Form a matrix from two vectors, row-wise.
Form a matrix from two vectors, row-wise.
the first vector -> row 0
the second vector -> row 1
Compute the outer product of vector x and vector y.
Compute the outer product of vector x and vector y. The result of the outer product is a matrix where c(i, j) is the product of i-th element of x with the j-th element of y.
the first vector
the second vector
Multiply vector u by matrix a.
Multiply vector u by matrix a. Treat u as a row vector.
the vector to multiply by
the matrix to multiply by (requires sameCrossDimensions)
The
MatrixI
companion object provides operations forMatrixI
that don't require 'this' (like static methods in Java). It provides factory methods for building matrices from files or vectors.