Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Solution 231488

Submitted on 16 Apr 2013 by @bmtran

Correct

21Size
Leading solution size is 14.
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test
Code Input and Output
1
Pass
 
%%
x = eye(9);
y = [1     0     0     0     0     0     0
     0     1     0     0     0     0     0
     0     0     1     0     0     0     0
     0     0     0     1     0     0     0
     0     0     0     0     1     0     0
     0     0     0     0     0     1     0
     0     0     0     0     0     0     1];
assert(isequal(external_frame(x),y))

                    
2
Pass
 
%%
x = magic(7);
y = [47     7     9    18    27
      6     8    17    26    35
     14    16    25    34    36
     15    24    33    42    44
     23    32    41    43     3];
assert(isequal(external_frame(x),y))