Index sum and strip my matrix Index sum and strip my matrix

Given a matrix/2d array in your preferable language

Input:


The matrix will always have an odd length
The matrix will always be perfectly square
The matrix values can be any integer in your language (positive or negative)




Example:

1  2  3  4  5  6  7
2  3  4  5  6  7  8
3  4  50 6  7  8  9
4  5  6 100 8  9  10
5  6  7  8 -9  10 11
6  7  8  9  10 11 12
7  8 900 10 11 12 0




Definitions:


The "central number" is defined as the number that has the same amount of numbers to the left,right,up and down


In this case its middlemost 100


The "outer shell" is the collection of numbers which their x and y index is or 0 or the matrix size




1  2  3  4  5  6  7
2                 8
3                 9
4                 10
5                 11
6                 12
7  8 900 10 11 12 0


Your task:

Add to the central number the sum of each row and column after multiplying the values in each by their 1-based index

A single row for example 

4  5  6  7  8


for each number

number * index + number * index.....

4*1 + 5*2 + 6*3 + 7*4 + 8*5 =&gt; 100




example:

 2 -3 -9  4  7  1  5  =&gt; 61
-2  0 -2 -7 -7 -7 -4  =&gt; -141
 6 -3 -2 -2 -3  2  1  =&gt; -10
 8 -8  4  1 -8  2  0  =&gt; -20
-5  6  7 -1  8  4  8  =&gt; 144
 1  5  7  8  7 -9 -5  =&gt; 10
 7  7 -2  2 -7 -8  0  =&gt; -60
                         |
78 65 60 45 -15 -89 10   =&gt; 154
                     |
                     =&gt; -16



For all rows and columns you combine these values..
Now you sum these too => 154-16 = 138
You add that number to the "central number" and remove the "outer shell" of the matrix




 0 -2 -7 -7 -7     =&gt; -88
-3 -2 -2 -3  2     =&gt; -15
-8  4 1+138 -8  2  =&gt; 395
 6  7 -1  8  4     =&gt; 69
 5  7  8  7 -9     =&gt; 26

19 69 442 30 -26


do this untill you end up with a single number

-2 -2 -3     =&gt; -15
 4  1060 -8  =&gt; 2100
 7 -1  8     =&gt; 29

27 2115 5



Add 2114+2147 to 1060
Remove the "outer shell" and get 5321
Now we have a single number left


this is the output!

test cases: 

-6

-6




-7 -1  8
-4 -6  7
-3 -6  6

2




 6  7 -2  5  1
-2  6 -4 -2  3
-1 -4  0 -2 -7
 0  1  4 -4  8
-8 -6 -5  0  2

-365




 8  3  5  6  6 -7  5
 6  2  4 -2 -1  8  3
 2  1 -5  3  8  2 -3
 3 -1  0  7 -6  7 -5
 0 -8 -4 -9 -4  2 -8
 8 -9 -3  5  7  8  5
 8 -1  4  5  1 -4  8

17611




-9 -7  2  1  1 -2  3 -7 -3  6  7  1  0
-7 -8 -9 -2  7 -2  5  4  7 -7  8 -9  8
-4  4 -1  0  1  5 -3  7  1 -2 -9  4  8
 4  8  1 -1  0  7  4  6 -9  3 -9  3 -9
-6 -8 -4 -8 -9  2  1  1 -8  8  2  6 -4
-8 -5  1  1  2 -9  3  7  2  5 -6 -1  2
-8 -5 -7 -4 -9 -2  5  0  2 -4  2  0 -2
-3 -6 -3  2 -9  8  1 -5  5  0 -4 -1 -9
-9 -9 -8  0 -5 -7  1 -2  1 -4 -1  5  7
-6 -9  4 -2  8  7 -9 -5  3 -1  1  8  4
-6  6 -3 -4  3  5  6  8 -2  5 -1 -7 -9
-1  7 -9  4  6  7  6 -8  5  1  0 -3  0
-3 -2  5 -4  0  0  0 -1  7  4 -9 -4  2

-28473770


This is a codegolf challenge so the program with the lowest bytecount wins
MATL, 36 34 bytes
tnq?`t&amp;+stn:*sytn2/)+ 7M(6Lt3$)tnq

Input is a 2D array with ; as row separator
Try it online! Or verify all test cases.
Explanation
tnq       % Take input. Duplicate, get number of elements, subtract 1
?         % If greater than 0
  `       %   Do...while
    t     %     Duplicate
    &amp;+    %     Sum matrix with its transpose
    s     %     Sum each column. Gives a row vector
    tn:   %     Vector [1 2 ...] with the same size
    *     %     Multiply element-wise
    s     %     Sum of vector. This will be added to center entry of the matrix
    y     %     Duplicate matrix
    tn2/  %     Duplicate, get half its number of elements. Gives non-integer value
    )     %     Get center entry of the matrix, using linear index with implicit rounding
    +     %     Add center entry to sum of previous vector
    7M    %     Push index of center entry again
    (     %     Assgined new value to center of the matrix
    6Lt   %     Array [2 j1-1], twice. This will be used to remove shell
    3$)   %     Apply row and col indices to remove outer shell of the matrix
    tnq   %     Duplicate, number of elements, subtract 1. Falsy if matrix has 1 entry
          %   End do...while implicitly. The loop is exited when matrix has 1 entry
          % End if implicitly
          % Display stack implicitly