MATLAB O/X QUIZ


MATLAB O/X Quiz
Answer BEFORE Googling!
  1. An infinite loop can be made using "for".
  2. "A == A" is always true.
  3. "round(2.5)" is 3.
  4. "round(-0.5)" is 0.
Chen Lin
Chen Lin le 23 Fév 2024
This is a fun way to share and learn some quick tips!
Stephen23
Stephen23 le 23 Fév 2024
TFTF
the cyclist
the cyclist le 23 Fév 2024
I did not realize that the most obvious way to attempt #1 will give a warning:
Warning: Too many FOR loop iterations. Stopping after 9223372036854775806 iterations.
I have not figured out how to do that one, and I am leaning toward False. (It's trivial with a while loop, of course.)
Stephen23
Stephen23 le 28 Fév 2024 (modifié(e) le 28 Fév 2024)
"It's trivial with a while loop, of course."
When somone demonstrates an infinite WHILE-loop, then I will very happily concede that an "infinite" FOR-loop is not currently possible. Because apparently an infinite WHILE-loop is "trivial", I look forward to this demonstration soon... (although I fear that I might not survive the heat death of the universe to view preliminary results).
Rik
Rik le 24 Fév 2024

I'm also leaning towards false, since even if the number of iterations is functionally infinite (and 9,223,372,036,854,775,806 is), I can only think of ways that result in a finite number of iterations.

Tags