Cody

Problem 2460. Signal Processing Basic - 1. Stretch a signal

Solution 2714241

Submitted on 20 Jul 2020
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   Fail
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)

Error in solution: Line: 4 Column: 40 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

2   Fail
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);

Error in solution: Line: 4 Column: 40 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

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

Error in solution: Line: 4 Column: 40 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.