![]() |
Exploiting MATLAB's Data Structures |
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
ms
r
r
![]()
Copyright © 1997 The MathWorks, Inc.
clay@mathworks.com
$Revision$ $Date$