-
2 Comments
James
on 27 Sep 2017
Would this also work if the y_correct values were 3, 2, 1 instead of 1, 2, 3?
David Verrelli
on 28 Sep 2017
The code _as is_ wouldn't work, but it could easily be adapted. Either with a switch statement, or by simply calculating 4 – {erstwhile result};
Suggested Problems
-
Count from 0 to N^M in base N.
236 Solvers
-
400 Solvers
-
292 Solvers
-
Try 1.5.4: Celsius to Fahrenheit
833 Solvers
-
554 Solvers
More from this Author32
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!