This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
y=[4 4 4 3 3 3 5 5 5 2 9 7 12 6 6 5 1 3 3 3 21 ];
x_correct = [
4
4
4
3
3
3
5
5
5
6
6
6
8
8
8
3
3
3
9
9
9
];
assert(isequal(moving_average(y),x_correct))
y =
4
4
4
3
3
3
5
5
5
6
6
6
8
8
8
3
3
3
9
9
9
|
2 | Pass |
y=[4 13 4 3 3 6 5 6 4 ];
x_correct = [ 7
7
7
4
4
4
5
5
5];
assert(isequal(moving_average(y),x_correct))
y =
7
7
7
4
4
4
5
5
5
|
397 Solvers
299 Solvers
07 - Common functions and indexing 5
255 Solvers
Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
230 Solvers
240 Solvers