Cody

Solution 2179106

Submitted on 28 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 = [1 2]; y = [2;3]; z_correct = 8; assert(isequal(in_prod(x,y),z_correct))

Undefined function 'row' for input arguments of type 'double'. Error in in_prod (line 2) if(row(x) == col(y)) Error in Test1 (line 4) assert(isequal(in_prod(x,y),z_correct))

2   Fail
x = -5; y = 100; z_correct = -500; assert(isequal(in_prod(x,y),z_correct))

Undefined function 'row' for input arguments of type 'double'. Error in in_prod (line 2) if(row(x) == col(y)) Error in Test2 (line 4) assert(isequal(in_prod(x,y),z_correct))

3   Fail
x = [1 2 3]; y = [2;3]; assert(isStringScalar(in_prod(x,y)))

Undefined function 'row' for input arguments of type 'double'. Error in in_prod (line 2) if(row(x) == col(y)) Error in Test3 (line 3) assert(isStringScalar(in_prod(x,y)))

Suggested Problems

More from this Author13