Cody

# Problem 43279. Weighted moving average

Solution 3064786

Submitted on 5 Oct 2020 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
x1=[1 2 1]; y1=[1 2 2 4 5 6 6 8]; y_correct = [2.3333 3.3333 5.0000 6.6667 7.6667 8.6667]; assert(sum(abs(smooth1dconv(x1,y1)-y_correct))<0.001)

z = 2.3333 z = 2.3333 3.3333 z = 2.3333 3.3333 5.0000 z = 2.3333 3.3333 5.0000 6.6667 z = 2.3333 3.3333 5.0000 6.6667 7.6667 z = 2.3333 3.3333 5.0000 6.6667 7.6667 8.6667

2   Pass
x1=[1 2 1]; y1=[1 1 1 1 1 1 1 1]; y_correct = [1.3333 1.3333 1.3333 1.3333 1.3333 1.3333]; assert(sum(abs(smooth1dconv(x1,y1)-y_correct))<0.001)

z = 1.3333 z = 1.3333 1.3333 z = 1.3333 1.3333 1.3333 z = 1.3333 1.3333 1.3333 1.3333 z = 1.3333 1.3333 1.3333 1.3333 1.3333 z = 1.3333 1.3333 1.3333 1.3333 1.3333 1.3333

### Community Treasure Hunt

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

Start Hunting!