You are now following this channel
- You will see updates in your content feed.
- You may receive emails, depending on your notification preferences.
You are now following this topic
- You will see updates in your content feed.
- You may receive emails, depending on your notification preferences.
MATLAB O/X QUIZ
MATLAB O/X Quiz
Answer BEFORE Googling!
- An infinite loop can be made using "for".
- "A == A" is always true.
- "round(2.5)" is 3.
- "round(-0.5)" is 0.
5 Comments
Permanently delete this reply?
This cannot be undone.
Direct link to this reply:
Chen Lin
on 23 Feb 2024
(Edited )
This is a fun way to share and learn some quick tips!
Permanently delete this reply?
This cannot be undone.
Direct link to this reply:
Stephen23
on 23 Feb 2024
(Edited )
TFTF
Permanently delete this reply?
This cannot be undone.
Direct link to this reply:
the cyclist
on 23 Feb 2024
(Edited )
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.)
Permanently delete this reply?
This cannot be undone.
Direct link to this reply:
Stephen23
on 28 Feb 2024
(Edited on 28 Feb 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).
Permanently delete this reply?
This cannot be undone.
Direct link to this reply:
Rik
on 24 Feb 2024
(Edited )
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.
Sign in to participate
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)