Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
23
Task/Zig-zag-matrix/Maple/zig-zag-matrix-1.maple
Normal file
23
Task/Zig-zag-matrix/Maple/zig-zag-matrix-1.maple
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
zigzag1:=proc(n)
|
||||
uses ArrayTools;
|
||||
local i,u,v,a;
|
||||
u:=Replicate(<-1,1>,n):
|
||||
v:=Vector[row](1..n,i->i*(2*i-3)):
|
||||
v:=Reshape(<v+~1,v+~2>,2*n):
|
||||
a:=Matrix(n,n):
|
||||
for i to n do
|
||||
a[...,i]:=v[i+1..i+n];
|
||||
v+=u
|
||||
od:
|
||||
a
|
||||
end:
|
||||
|
||||
zigzag2:=proc(n)
|
||||
local i,v,a;
|
||||
a:=zigzag1(n);
|
||||
v:=Vector(1..n-1,i->i^2);
|
||||
for i from 2 to n do
|
||||
a[n+2-i..n,i]-=v[1..i-1]
|
||||
od;
|
||||
a
|
||||
end:
|
||||
1
Task/Zig-zag-matrix/Maple/zig-zag-matrix-2.maple
Normal file
1
Task/Zig-zag-matrix/Maple/zig-zag-matrix-2.maple
Normal file
|
|
@ -0,0 +1 @@
|
|||
zigzag1(6);
|
||||
1
Task/Zig-zag-matrix/Maple/zig-zag-matrix-3.maple
Normal file
1
Task/Zig-zag-matrix/Maple/zig-zag-matrix-3.maple
Normal file
|
|
@ -0,0 +1 @@
|
|||
zigzag2(6);
|
||||
Loading…
Add table
Add a link
Reference in a new issue