Problem 729. Flag largest magnitude swings as they occur
Solution Stats
Problem Comments
-
3 Comments
Kevin Hellemans
on 18 Sep 2013
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!
Abhishek Jain
on 16 Sep 2016
Nice question.
Abir Hasan
on 1 Aug 2018
Nice problem
Solution Comments
-
1 Comment
yurenchu
on 2 Oct 2017
Flawed solution; fails (for example) when 0
-
1 Comment
sjoerd
on 7 Dec 2016
Officially not correct because it assumes that the first entry of x is 1, which is true for all testcases
-
1 Comment
yurenchu
on 2 Oct 2017
Flawed solution; fails when delta(1)<0, or when 0
-
1 Comment
Alex Buczynsky
on 9 Oct 2016
This is genius lololol
-
1 Comment
Konstantinos
on 13 Jun 2013
great solution Gwendolyn
-
1 Comment
J.R.! Menzinger
on 1 Nov 2012
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.!
Problem Recent Solvers651
Suggested Problems
-
6912 Solvers
-
2446 Solvers
-
966 Solvers
-
212 Solvers
-
1250 Solvers
More from this Author51
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!