Problem 561. Find the jerk

Solution 890548

Submitted on 16 May 2016
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
h = 0.065; % stepsize t = -10:h:10; for tr = 1:1000 sigCoefs = 2*rand(1,3)-1; sig = polyval(sigCoefs,t); breakPoint = randi(length(sig)-2)+1; sig(breakPoint) = (1.01)*sig(breakPoint); assert(any(abs(findAJerk(sig) - breakPoint)<=6)) % extra wide window out of kindness end

Error using findAJerk>@(sig)(sig(2:end-1)-sig(1:end-w))-(sig(3:end)-sig(2:end-1)) Undefined function or variable 'w'.

Suggested Problems

More from this Author1

Community Treasure Hunt

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

Start Hunting!