Cody

Problem 45447. Element-wise vector product (★)

Solution 3190861

Submitted on 13 Oct 2020 by TurqoiseInt
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 3 ]; y = [ 3 2 1 ]; z_correct = [3 4 3]; assert(isequal(vector_dot(x,y),z_correct))

2   Pass
x = [ 1 2 3 4 ]; y = [2 3 2 1 ]; z_correct = [2 6 6 4]; assert(isequal(vector_dot(x,y),z_correct))

Suggested Problems

More from this Author46

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!