Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
18
Task/Cramers-rule/Maple/cramers-rule.maple
Normal file
18
Task/Cramers-rule/Maple/cramers-rule.maple
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
with(LinearAlgebra):
|
||||
cramer:=proc(A,B)
|
||||
local n,d,X,V,i;
|
||||
n:=upperbound(A,2);
|
||||
d:=Determinant(A);
|
||||
X:=Vector(n,0);
|
||||
for i from 1 to n do
|
||||
V:=A(1..-1,i);
|
||||
A(1..-1,i):=B;
|
||||
X[i]:=Determinant(A)/d;
|
||||
A(1..-1,i):=V;
|
||||
od;
|
||||
X;
|
||||
end:
|
||||
|
||||
A:=Matrix([[2,-1,5,1],[3,2,2,-6],[1,3,3,-1],[5,-2,-3,3]]):
|
||||
B:=Vector([-3,-32,-47,49]):
|
||||
printf("%a",cramer(A,B));
|
||||
Loading…
Add table
Add a link
Reference in a new issue