Contains function
get-augmented-matrix
solve
get-solution-matrix
Given the dimensional matrix of a system
(def dimat [ [2 -1 3 0 0 -2 1]
[1 0 -1 0 2 1 2]
[0 1 0 3 1 -1 2] ])
to get the augmented matrix
=> (get-augmented-matrix dimat)
[[0 -2 1 -2 1 -3 0] [2 1 2 -1 0 1 0] [1 -1 2 0 -1 0 -3]]
and solve
=> (solve (get-augmented-matrix dimat))
[[1 0N 0N -11N 9N -9N 15N] [0 1 0N 5N -4N 5N -6N] [0 0N 1N 8N -7N 7N -12N]]
To get the solution matrix
=> (get-solution-matrix (solve (get-augmented-matrix dimat)))
[[1 0 0 0 -11N 5N 8N] [0 1 0 0 9N -4N -7N] [0 0 1 0 -9N 5N 7N] [0 0 0 1 15N -6N -12N]]
Contains function - `get-augmented-matrix` - `solve` - `get-solution-matrix` Given the dimensional matrix of a system ``` (def dimat [ [2 -1 3 0 0 -2 1] [1 0 -1 0 2 1 2] [0 1 0 3 1 -1 2] ]) ``` to get the augmented matrix ``` => (get-augmented-matrix dimat) [[0 -2 1 -2 1 -3 0] [2 1 2 -1 0 1 0] [1 -1 2 0 -1 0 -3]] ``` and solve ``` => (solve (get-augmented-matrix dimat)) [[1 0N 0N -11N 9N -9N 15N] [0 1 0N 5N -4N 5N -6N] [0 0N 1N 8N -7N 7N -12N]] ``` To get the solution matrix ``` => (get-solution-matrix (solve (get-augmented-matrix dimat))) [[1 0 0 0 -11N 5N 8N] [0 1 0 0 9N -4N -7N] [0 0 1 0 -9N 5N 7N] [0 0 0 1 15N -6N -12N]] ```
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close