Cody

Solution 883527

Submitted on 27 Apr 2016 by William
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
n = 1:10; a = sin(2*pi*(50/500)*n); b = [0.5878 0.9458 0.9511 0.7323 0.2484 -0.3112 -0.7803 -0.9511 -0.9276 -0.5413]; assert(sqrt(sum((b - stc(a,.9)).^2))<.1)

2   Pass
a = [1 2 1 3 1 4 5]; b = [1.0000 1.9900 1.1040 2.5680 1.7040 2.3125 4.5680]; assert(sqrt(sum((b - stc(a,.9)).^2))<.1);

3   Pass
n = 1:10000; a = sin(2*pi*(50/500)*n); b = a; assert(sqrt(sum((b - stc(a,1)).^2))<.1);