Cramer's rule: Difference between revisions

Line 1,767:
| (a | det) as $ad
| if $ad == 0 then "matrix determinant is 0" | error
| else reduce range(0; $n) as $c (null;
(reduce range(0; $n) as $r (a; .[$r][$c] = d[$r])) as $aa
| .[$c] = ($aa|det) / $ad ) ;
end ;
def a: [
Line 1,786 ⟶ 1,787:
Solution is [2,-12,-4,1]
</pre>
 
=={{header|Julia}}==
{{works with|Julia|0.6}}
2,467

edits