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 2024년 2월 23일
This is a fun way to share and learn some quick tips!
Stephen23
Stephen23 2024년 2월 23일
TFTF
the cyclist
the cyclist 2024년 2월 23일
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 2024년 2월 28일 (2024년 2월 28일에 수정됨)
"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 2024년 2월 24일

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.

태그