Cody

Problem 646. Getting the row and column location from a matrix

Solution 2728422

Submitted on 22 Jul 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
M = magic(5); thresh = 4; [r,c]= find(magic(5) > 4) out = [r c] assert(isequal(RCgreaterThan(M, thresh),out))

Error in solution: Line: 2 Column: 20 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

2   Fail
M = magic(6); thresh = 2; [r,c]= find(magic(6) > 2) out = [r c] assert(isequal(RCgreaterThan(M, thresh),out))

Error in solution: Line: 2 Column: 20 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.