For this discussion I will assume a 9x9 matrix but my question is for a general nxn matrix.
I have a matrix which is not only symmetric along the vertical and the horizontal axis, but is axisymmetric about its center. So for a 9x9 matrix I have the following set of constraints:
$$x_{i,j} = x_{k,l}$$ if $$ (i-5)^2+(j-5)^2 = (k-5)^2 + (l-5)^2.$$
It goes without saying that $(i,j)\equiv(5,5)$ is the center of the matrix.
I also know the sum of the matrix along one dimension say
$$
\begin{matrix}
0 & 1 & 4 & 9 & 12 &9 & 4 & 1 & 0.
\end{matrix}
$$
I was trying to solve it using the lsqlin function in Matlab. However the function accepts a vector $x$ while I have a 2D matrix. Also, I am not able to figure out a way to tell Matlab the set of constraints I have mentioned above (i.e. the constraints imposed by axisymmetry). Before I start digging deeper I wanted to know if such a set of equations will and certainly will have a unique solution. For instance, in the case of a 9x9 matrix I have 81 unknowns and 9 equations (defined by the sum along the dimesion). The axisymmetry provides a few more equations (though I am not sure exactly how many).
The equations divide the matrix into eight triangles, bounded by the straight lines $i=5$, $j=5$,$i=j$,$i+j=10$. There is no connection between numbers inside one of these triangles. There are 15 degrees of freedom to make the triangle, and the numbers in all the other triangles follow.
It is a bit worse, because the sums must have the symmetry that you found, so you only have $5$ different sums.
In the general case, you have either $n(n+2)/8$ or $(n+1)(n+3)/8$ degrees of freedom, but only $n/2$ or $(n+1)/2$ sums.