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 257069

Submitted on 6 Jun 2013 by James

Correct

16Size
Leading solution size is 11.
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
 
%% test 1
x = magic(3);
y_correct = norm(x,'fro'); %16.8819
assert(isequal(myFrobeniusnorm(x),y_correct))

                    
2
Pass
 
%% test 2
x = magic(4)
y_correct = norm(x,'fro'); % 38.6782;
assert(isequal(myFrobeniusnorm(x),y_correct))
x =
    16     2     3    13
     5    11    10     8
     9     7     6    12
     4    14    15     1