The phrasing might be a bit ambiguous, as magnitude swing could also be thought of as delta(i-1)-delta(i) instead of just delta(i). Nonetheless fun problem!
Nice question.
Nice problem
Flawed solution; fails (for example) when 0
Officially not correct because it assumes that the first entry of x is 1, which is true for all testcases
Flawed solution; fails when delta(1)<0, or when 0
This is genius lololol
great solution Gwendolyn
Very nice the construct to avoid (for example) meshgrid!!
also the use of 'minus' to avois the use of double(...)-double(...)
Very interesting!
J.R.!
404 Solvers
Back to basics 18 - justification
176 Solvers
Find the largest value in the 3D matrix
1056 Solvers
Getting the absolute index from a matrix
211 Solvers
Rounding off numbers to n decimals
1050 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!