%% Third-Order Magic Square
% Compute the third-order magic square M.

M = magic(3)

%
% The sum of the elements in each column and the sum of the elements in each row are the same.

sum(M)

%

sum(M,2)

% Copyright 2012 The MathWorks, Inc.