Cody

Problem 2247. Dimensions of Spaces

Solution 2887937

Submitted on 28 Aug 2020 by Rafael S.T. Vieira
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));

Suggested Problems

More from this Author21

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!