function A = MyMagic(n)
% n Odd
% A an n-by-n magic square
% Check against A = Magic(n)

A = zeros(n,n);
% Put a "1" in the middle of the top row...
i = 1; j = (n+1)/2; A(i,j) = 1;
% Now find a home for 2,3,...,n^2
for k=2:n^2
if i-1>=1 && j+1<=n && A(i,j) ==0
i = i-1;
j = j+1;
A(i,j) = k;
elseif B_blocked
% Northeast neighbor occupied
elseif B_top
% Northeast neighbor beyond top edge
elseif B2
% Northeast neighbor beyond right edge
else
% Any other situation?
end
end