Cody

Problem 2904. Matlab Basics II - 3 Dimensional Arrays

Solution 2175114

Submitted on 25 Mar 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) = [48,96;40,80;42,84;45,90]; x(:,:,2) = [42,84;36,72;40,80;42,84]; n = 2 y_correct = 72; assert(isequal(phy_grade(x,n),y_correct))

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

2   Fail
x(:,:,3) = [3,6;32,64;42,84;45,90]; n = 3 y_correct = 64; assert(isequal(phy_grade(x,n),y_correct))

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