Cody

Solution 2049868

Submitted on 7 Dec 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
A=zeros(100,100,100); i=randi(100); j=randi(100); k=randi(100); A(i,j,k)=1; y=find1number(A) assert(isequal(y,[i,j,k]))

a = 8370

Not enough input arguments. Error in ind2sub (line 37) vi = rem(ndx-1, k(i-1)) + 1; Error in find1number (line 3) [i,j,k]=ind2sub(a) Error in Test1 (line 6) y=find1number(A)

2   Fail
A=zeros(100,100,100); i=randi(100); j=randi(100); k=randi(100); A(i,j,k)=1; y=find1number(A) assert(isequal(y,[i,j,k]))

a = 574291

Not enough input arguments. Error in ind2sub (line 37) vi = rem(ndx-1, k(i-1)) + 1; Error in find1number (line 3) [i,j,k]=ind2sub(a) Error in Test2 (line 6) y=find1number(A)