Cody

# Problem 44299. Vector Element Multiplication

Solution 1972725

Submitted on 12 Oct 2019 by Nikolaos Nikolaou
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 4 5]; y = [1 2 3 4 5]; ele_mult_vec = [1 4 9 16 25]; assert(isequal(your_fcn_name(x,y),ele_mult_vec))

ele_mult_vec = 1 4 9 16 25

2   Pass
x = ones(1,10); y = ones(1,10); ele_mult_vec = ones(1,10); assert(isequal(your_fcn_name(x,y),ele_mult_vec))

ele_mult_vec = 1 1 1 1 1 1 1 1 1 1

3   Pass
x = ones(1,10); y = 10:10:100; ele_mult_vec = 10:10:100; assert(isequal(your_fcn_name(x,y),ele_mult_vec))

ele_mult_vec = 10 20 30 40 50 60 70 80 90 100

4   Pass
x = 10:10:100; y = 0.1*ones(1,10); ele_mult_vec = 1:10; assert(isequal(your_fcn_name(x,y),ele_mult_vec))

ele_mult_vec = 1 2 3 4 5 6 7 8 9 10

5   Pass
x = 1:3; y = 4:6; ele_mult_vec = [4 10 18]; assert(isequal(your_fcn_name(x,y),ele_mult_vec))

ele_mult_vec = 4 10 18

6   Pass
x = mod(1:100,2); y = mod([2:100,1],2); ele_mult_vec = zeros(1,100); assert(isequal(your_fcn_name(x,y),ele_mult_vec))

ele_mult_vec = Columns 1 through 30 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 31 through 60 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 61 through 90 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 91 through 100 0 0 0 0 0 0 0 0 0 0

### Community Treasure Hunt

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

Start Hunting!