%% Plot Hadamard Matrix
% A Hadamard matrix has elements that are either 1 or -1. A good way to visualize this matrix is with a two-color colormap.
% Create a 20-by-20 Hadamard matrix. Then plot the matrix using a black and white colormap. Use the axis function to reverse the direction of the y-axis and set the axis lines to equal lengths.

C = hadamard(20);
pcolor(C)
colormap(gray(2))
axis ij
axis square

% Copyright 2015 The MathWorks, Inc.