Cody

# Problem 42458. Determine the mean of matrix

Solution 2030266

Submitted on 21 Nov 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
filetext = fileread('mean_matrix.m'); assert(isempty(strfind(filetext, 'mean(')),'mean forbidden') assert(isempty(strfind(filetext, 'mean (')),'mean forbidden') assert(isempty(strfind(filetext, '...')),'... forbidden')

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

2   Fail
x=1; y=1; assert(isequal(mean_matrix(x),y));

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

3   Fail
x = [5 4 8;4 7 8;5 7 8]; y=6.2222; assert(abs(mean_matrix(x)-y)<0.0001);

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