Returns true
if this is a normal matrix. Raises an error if matrix is not square.
Returns true
if this is an orthogonal matrix Raises an error if matrix is not square.
Returns true
if all entries of the matrix are real.
Returns true
if this is a regular (i.e. non-singular) matrix.
Returns true
if this is a square matrix.
Returns a new matrix resulting by stacking horizontally the receiver with the given matrices
x = Matrix[[1, 2], [3, 4]] y = Matrix[[5, 6], [7, 8]] x.hstack(y) # => Matrix[[1, 2, 5, 6], [3, 4, 7, 8]]
Returns a new matrix resulting by stacking vertically the receiver with the given matrices
x = Matrix[[1, 2], [3, 4]] y = Matrix[[5, 6], [7, 8]] x.vstack(y) # => Matrix[[1, 2], [3, 4], [5, 6], [7, 8]]
Returns the Eigensystem of the matrix; see EigenvalueDecomposition
.
m = Matrix[[1, 2], [3, 4]] v, d, v_inv = m.eigensystem d.diagonal? # => true v.inv == v_inv # => true (v * d * v_inv).round(5) == m # => true
Returns the real part of the matrix.
Matrix[[Complex(1,2), Complex(0,1), 0], [1, 2, 3]] => 1+2i i 0 1 2 3 Matrix[[Complex(1,2), Complex(0,1), 0], [1, 2, 3]].real => 1 0 0 1 2 3
Returns an array containing matrices corresponding to the real and imaginary parts of the matrix
m.rect == [m.real, m.imag] # ==> true for all matrices m
Returns an array of arrays that describe the rows of the matrix.
Overrides Object#to_s
Returns a new vector with the same direction but with norm 1.
v = Vector[5,8,2].normalize # => Vector[0.5184758473652127, 0.8295613557843402, 0.20739033894608505] v.norm => 1.0
Returns the elements of the vector in an array.
Overrides Object#to_s
Directs to reject specified class argument.
t
Argument class specifier, any object including Class
.
reject(t)
Release code
Removes the last List
.