Problem 561. Find the jerk
No, it's not the author of this problem...
Jerk is the rate of change in acceleration over time of an object. So, if given the position of an object over time in the form of a 1-by-N vector, return the indices i where there is nonzero jerk.
Super rad bonus hint: The signal you need to find the jerk of will be given by the variable sig, created with the commands
h = 0.065; % stepsize t = -10:h:10; sigCoefs = 2*rand(1,3)-1; sig = polyval(sigCoefs,t); breakPoint = randi(length(sig)-2)+1; sig(breakPoint) = (1.01)*sig(breakPoint); % this creates a nonzero jerk
Check the signal visually with
plot(t,sig,'k.-')
Now, using just sig, determine breakPoint.
Solution Stats
Problem Comments
-
4 Comments
Kye, not a problem. I will try again. Cheers.
I realize that an even better signal would be one created as before except with the modification
sig(breakPoint) = (-1)^(randi(2)-1)*(1.01)*sig(breakPoint);
so that the jerk could be positive or negative...
Many of the solutions return multiple invalid answers. The test condition "any" allows these to pass. Suggest change "any" to "all". all(abs(findAJerk(sig) - breakPoint)<=6)
Solution Comments
Show commentsGroup

Computational Geometry II
- 20 Problems
- 18 Finishers
- Dots in a Diamond
- Property dispute!
- Shifted Hexagonal Tiling Dots in a Circle
- Hexagonal Tiling Dots in a Circle
- Dots in a Sphere
- Triangular Tiling Dots in a Circle
- Beads on a Necklace (Convex Hulls)
- Minimum Distance between two N-sided Polygons
- Minimum Distance Point to Segment
- Dots in a Circle
- Edges of a n-dimensional Hypercube
- Volume of a Simplex
- Find the optimal shape to bring the maximum product by a given perimeter
- Number of lattice points within a circle
- Points on a circle.
- Perimeter
- Geometry: Find Circle given 3 Non-Colinear Points
- Points on a Sphere
- Volume difference between Ellipsoid and Sphere
- Property dispute!
- Crossing to Kissing - Untangle the Lines
Problem Recent Solvers57
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!