Cody

Solution 2164028

Submitted on 18 Mar 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
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

ans = Columns 1 through 18 -0.5580 -0.5543 -0.5506 -0.5469 -0.5431 -0.5394 -0.5357 -0.5320 -0.5282 -0.5245 -0.5208 -0.5171 -0.5134 -0.5096 -0.5059 -0.5022 -0.4985 -0.4948 Columns 19 through 36 -0.4910 -0.4873 -0.4836 -0.4799 -0.4762 -0.4724 -0.4687 -0.4650 -0.4613 -0.4576 -0.4538 -0.4501 -0.4464 -0.4427 -0.4389 -0.4352 -0.4315 -0.4278 Columns 37 through 54 -0.4241 -0.4203 -0.4166 -0.4129 -0.4092 -0.4055 -0.4017 -0.3980 -0.3943 -0.3906 -0.3869 -0.3831 -0.3794 -0.3757 -0.3720 -0.3682 -0.3645 -0.3608 Columns 55 through 72 -0.3571 -0.3534 -0.3496 -0.3459 -0.3422 -0.3385 -0.3348 -0.3310 -0.3273 -0.3236 -0.3199 -0.3162 -0.3124 -0.3087 -0.3050 -0.3013 -0.2976 -0.2938 Columns 73 through 90 -0.2901 -0.2864 -0.2827 -0.2789 -0.2752 -0.2715 -0.2678 -0.2641 -0.2603 -0.2566 -0.2529 -0.2492 -0.2455 -0.2417 -0.2380 -0.2343 -0.2306 -0.2269 Columns 91 through 108 -0.2231 -0.2194 -0.2157 -0.2120 -0.2083 -0.2045 -0.2008 -0.1971 -0.1934 -0.1896 -0.1859 -0.1822 -0.1785 -0.1748 -0.1710 -0.1673 -0.1636 -0.1599 Columns 109 through 126 -0.1562 -0.1524 -0.1487 -0.1450 -0.1413 -0.1376 -0.1338 -0.1301 -0.1264 -0.1227 -0.1189 -0.1152 -0.1115 -0.1078 -0.1041 -0.1003 -0.0966 -0.0929 Columns 127 through 144 -0.0892 -0.0855 -0.0817 -0.0780 -0.0743 -0.0706 -0.0669 -0.0631 -0.0594 -0.0557 -0.0520 -0.0483 -0.0445 -0.0408 -0.0371 -0.0334 -0.0296 -0.0259 Columns 145 through 162 -0.0222 -0.0185 -0.0148 -0.0110 -0.0073 -0.0036 0.0001 0.0038 0.0076 0.0113 0.0150 0.0187 0.0224 0.0262 0.0299 0.0336 0.0373 0.0411 Columns 163 through 180 0.0448 0.0485 0.0522 0.0559 0.0597 0.0634 0.0671 0.0708 0.0745 0.0783 0.0820 0.0857 0.0894 0.0931 0.0969 0.1006 0.1043 0.1080 Columns 181 through 198 0.1117 0.1155 0.1192 0.1229 0.1266 0.1304 0.1341 0.1378 0.1415 0.1452 0.1490 0.1527 0.1564 0.1601 0.1638 0.1676 0.1713 0.1750 Columns 199 through 216 0.1787 0.1824 0.1862 0.1899 0.1936 0.1973 0.2011 0.2048 0.2085 0.2122 0.2159 0.2197 0.2234 0.2271 0.2308 0.2345 0.2383 0.3286 Columns 217 through 234 0.1591 0.2494 0.2531 0.2569 0.2606 0.2643 0.2680 0.2717 0.2755 0.2792 0.2829 0.2866 0.2904 0.2941 0.2978 0.3015 0.3052 0.3090 Columns 235 through 252 0.3127 0.3164 0.3201 0.3238 0.3276 0.3313 0.3350 0.3387 0.3424 0.3462 0.3499 0.3536 0.3573 0.3610 0.3648 0.3685 0.3722 0.3759 Columns 253 through 270 0.3797 0.3834 0.3871 0.3908 0.3945 0.3983 0.4020 0.4057 0.4094 0.4131 0.4169 0.4206 0.4243 0.4280 0.4317 0.4355 0.4392 0.4429 Columns 271 through 288 0.4466 0.4504 0.4541 0.4578 0.4615 0.4652 0.4690 0.4727 0.4764 0.4801 0.4838 0.4876 0.4913 0.4950 0.4987 0.5024 0.5062 0.5099 Columns 289 through 306 0.5136 0.5173 0.5210 0.5248 0.5285 0.5322 0.5359 0.5397 0.5434 0.5471 0.5508 0.5545 0.5583 0.5620 0.5657 0.5694 0.5731 0.5769 Column 307 0.5806

Output argument "idx" (and maybe others) not assigned during call to "findAJerk". Error in Test1 (line 9) assert(any(abs(findAJerk(sig) - breakPoint)<=6)) % extra wide window out of kindness

Suggested Problems

More from this Author1