Cody

Solution 2675564

Submitted on 10 Jul 2020 by Niccolò Becattini
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   Pass
x = [1 2]; y = [2;3]; z_correct = 8; assert(isequal(in_prod(x,y),z_correct))

rowx = 1 colx = 2 rowy = 2 coly = 1 z = 8

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

rowx = 1 colx = 1 rowy = 1 coly = 1 z = -500

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

rowx = 1 colx = 3 rowy = 2 coly = 1 z = "The inner dimensions are3 and 2 . Matrix multiplication is not possible"

Suggested Problems

More from this Author13