function C = checkerboard(n)

%*****************************************************************************80
%
%% checkerboard() A matrix of zeros and ones.
%
%   checkerboard(n) is an n-by-n matrix.
%
%  Licensing:
%
%   Copyright 2014 The MathWorks, Inc.
%
%  Author:
%
%    Cleve Moler
%
%  Reference:
%
%    Cleve Moler,
%    Experiments with MATLAB
%    https://www.mathworks.com/moler
%
[I,J] = meshgrid(1:n);
C = (mod(I+J,2)==0);
