Cody

Solution 1996265

Submitted on 30 Oct 2019 by bruce collett
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))

r1 = 1 c1 = 2 r2 = 2 c2 = 1 z = 8

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

r1 = 1 c1 = 1 r2 = 1 c2 = 1 z = -500

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

r1 = 1 c1 = 3 r2 = 2 c2 = 1 z = "Have you checked the inner dimensions?"