Cody

Solution 1801792

Submitted on 1 May 2019
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
mat=rand(10,10); r=3; c=5; ind=43; assert(isequal(index(mat,r,c),ind))

Insufficient number of outputs from right hand side of equal sign to satisfy assignment. Error in index (line 2) [rt,ct]=mat(r,c); Error in Test1 (line 5) assert(isequal(index(mat,r,c),ind))

2   Fail
mat=rand(3,24); r=2; c=22; ind=65; assert(isequal(index(mat,r,c),ind))

Insufficient number of outputs from right hand side of equal sign to satisfy assignment. Error in index (line 2) [rt,ct]=mat(r,c); Error in Test2 (line 5) assert(isequal(index(mat,r,c),ind))