Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Solution 288354

Submitted on 24 Jul 2013 by Jean-Marie SAINTHILLIER

Correct

15Size
Leading solution size is 10.
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test
Code Input and Output
1
Pass
 
%%
  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