Cody

Solution 2061061

Submitted on 17 Dec 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
x = [1 2]; y= [1 3]; d_correct=7; assert(isequal(vector_dot(x,y),d_correct))

Error using * Incorrect dimensions for matrix multiplication. Check that the number of columns in the first matrix matches the number of rows in the second matrix. To perform elementwise multiplication, use '.*'. Error in vector_dot (line 2) d = x*y; Error in Test1 (line 4) assert(isequal(vector_dot(x,y),d_correct))

2   Fail
x = [1 -1]; y= [1 1]; d_correct=0; assert(isequal(vector_dot(x,y),d_correct))

Error using * Incorrect dimensions for matrix multiplication. Check that the number of columns in the first matrix matches the number of rows in the second matrix. To perform elementwise multiplication, use '.*'. Error in vector_dot (line 2) d = x*y; Error in Test2 (line 4) assert(isequal(vector_dot(x,y),d_correct))

Suggested Problems