Cody

Solution 504580

Submitted on 24 Sep 2014 by Alfonso Nieto-Castanon
  • Size: 22
  • This is the leading solution.
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
%% A=[1 2 3 ; 4 6 7 ;2 4 6;1 2 3]; y_correct = [2 1 2 2]; assert(isequal(dim_space(A),y_correct))

2   Pass
%% A=ones(34,53); y_correct=[1 52 1 33]; assert(isequal(dim_space(A),y_correct))

3   Pass
%% A=1; y_correct=[1 0 1 0]; assert(isequal(dim_space(A),y_correct))

4   Pass
%% A=magic(5); y_correct=[5 0 5 0]; assert(isequal(dim_space(A),y_correct))

5   Pass
%% A=[1 1 2 3 3;3 4 5 6 7;3 4 5 6 7; 1 1 2 3 3]; y_correct=[2 3 2 2]; assert(isequal(dim_space(A),y_correct));