[MATLAB logo] Exploiting MATLAB's Data Structures

Problem #1 - Rank of Magic Squares

Is there any pattern to the rank of magic squares? In this problem you will create and manipulate the contents of a cell array to find out.

Goal: Create a simple sequence of statements to determine the rank of a series of magic squares. Bar plot the results and see if you notice any patterns. Solve the problem in stages and use a cell array to hold the intermediate results.

Key concepts: creating cell arrays, applying functions to the elements of a cell array, converting a cell array into a numeric array.

Key functions: magic, { }, rank, bar

What to do

[hint] [Show me the solution]

Copyright © 1997 The MathWorks, Inc.
clay@mathworks.com
$Revision$ $Date$