Cody

# Problem 42520. Rank of matrix

Solution 2613598

Submitted on 25 Jun 2020
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   Fail
x=[3 5; 9 6] y = 2; assert(isequal(rank(x),y))

x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x =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 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x = 3 5 9 6 x...

Out of memory. The likely cause is an infinite recursion within the program. Error in rank (line 3) ans=rank(x)

2   Fail
x=[1 1; 1 1] y = 1; assert(isequal(rank(x),y))

x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1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= 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x = 1 1 1 1 x...

Out of memory. The likely cause is an infinite recursion within the program. Error in rank (line 3) ans=rank(x)