Cody

Problem 43183. Removing vibration!

Solution 2066064

Submitted on 21 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   Pass
x = [1.71 2.03 3.28 4.05 5.10 6.82 7.69 8.32 9.95 10.03]; y_correct = [2.340 3.120 4.143 5.323 6.536 7.610 8.653 9.433]; assert((mean(mysmooth(x)-y_correct)<0.001))

x = 1 2 3 4 5 6 7 8 9 10 y = 1.7100 2.0300 3.2800 4.0500 5.1000 6.8200 7.6900 8.3200 9.9500 10.0300 z = 1 2 3 4 5 6 7 8 9 10 leny = 10 temp = 7.0200 output = 2.3400 temp = 9.3600 output = 2.3400 3.1200 temp = 12.4300 output = 2.3400 3.1200 4.1433 temp = 15.9700 output = 2.3400 3.1200 4.1433 5.3233 temp = 19.6100 output = 2.3400 3.1200 4.1433 5.3233 6.5367 temp = 22.8300 output = 2.3400 3.1200 4.1433 5.3233 6.5367 7.6100 temp = 25.9600 output = 2.3400 3.1200 4.1433 5.3233 6.5367 7.6100 8.6533 temp = 28.3000 output = 2.3400 3.1200 4.1433 5.3233 6.5367 7.6100 8.6533 9.4333 z = 2.3400 3.1200 4.1433 5.3233 6.5367 7.6100 8.6533 9.4333

2   Fail
x=[1 1 1] y_correct=1 assert((mean(mysmooth(x)-y_correct)<0.001))

x = 1 1 1 y_correct = 1 x = 1 2 3 4 5 6 7 8 9 10 y = 1.7100 2.0300 3.2800 4.0500 5.1000 6.8200 7.6900 8.3200 9.9500 10.0300 z = 1 2 3 4 5 6 7 8 9 10 leny = 10 temp = 7.0200 output = 2.3400 temp = 9.3600 output = 2.3400 3.1200 temp = 12.4300 output = 2.3400 3.1200 4.1433 temp = 15.9700 output = 2.3400 3.1200 4.1433 5.3233 temp = 19.6100 output = 2.3400 3.1200 4.1433 5.3233 6.5367 temp = 22.8300 output = 2.3400 3.1200 4.1433 5.3233 6.5367 7.6100 temp = 25.9600 output = 2.3400 3.1200 4.1433 5.3233 6.5367 7.6100 8.6533 temp = 28.3000 output = 2.3400 3.1200 4.1433 5.3233 6.5367 7.6100 8.6533 9.4333 z = 2.3400 3.1200 4.1433 5.3233 6.5367 7.6100 8.6533 9.4333

Assertion failed.

Suggested Problems

More from this Author27

Community Treasure Hunt

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

Start Hunting!