Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,11 @@
function matrix = reverseSpiral(n)
matrix = (-spiral(n))+n^2;
if mod(n,2)==0
matrix = flipud(matrix);
else
matrix = fliplr(matrix);
end
end %reverseSpiral

View file

@ -0,0 +1,9 @@
>> reverseSpiral(5)
ans =
0 1 2 3 4
15 16 17 18 5
14 23 24 19 6
13 22 21 20 7
12 11 10 9 8