MATLAB Excel Builder    

Illustration 3. Resize the Output

Reopen the Macro dialog, select the mymagic_resize macro, and click Run. This procedure returns a magic square of size 4 beginning in cell B32.

Change the value of 4 in cell A32 to a higher value and rerun this macro. A magic square of the size you specified in cell A32 is returned, beginning in cell B32.

Figure 4-5: Resized Magic Square


  Illustration 2. Transpose the Output Inspecting the Visual Basic Code