Muscat.AugmentedMatrix (muscat v0.2.0) View Source

Link to this section Summary

Functions

Create augmented matrix by augmented matrix list

Create augmented matrix by coefficient matrix list and constant column list

Reduce a augmented matrix into reduced row echelon form and give the equation solution.

Link to this section Types

Specs

Specs

matrix() :: [Muscat.Matrix.Cell.t(), ...]

Specs

solution() :: [Muscat.Fraction.t() | float() | :any]

Link to this section Functions

Link to this function

element_number(coefficient_matrix)

View Source

Specs

new(augmented_matrix :: [[element(), ...], ...]) :: [matrix(), ...]

Create augmented matrix by augmented matrix list

Link to this function

new(coefficient_matrix, constant_column)

View Source

Specs

new(
  coefficient_matrix :: [[element(), ...], ...],
  constant_column :: [element(), ...]
) :: [matrix(), ...]

Create augmented matrix by coefficient matrix list and constant column list

Link to this function

rref(matrix, opts \\ [])

View Source

Specs

rref(augmented_matrix :: matrix(), opts :: keyword()) ::
  {:ok, solution()}
  | {:error, :no_solution}
  | {:error, :infinite_solutions}
  | {:error, :approximate_solution}

Reduce a augmented matrix into reduced row echelon form and give the equation solution.

The function name rref is taken from Matlab.

Options

  • :value_type - The result value type, :float(default), :fraction.
  • :precision - If the result_type is :float, round the float.