Your code needs to take 'exactly' one second to run — accurate to ±0.5 milliseconds.
The input will be the number of milliseconds to wait (i.e. 1000).
No output is required.
Next: Just take it easy for a second or two!
intersection of matrices
Set a diagonal
Count decimal digits of a number
5th Time's a Charm
Make your own Test Suite (part 2)
Rate of event occurence: find percentiles of the distribution (for smallish rates)
Comparison of floating-point numbers (doubles)
Seemingly impossible problem
Testing for randomness: uniform distribution of real numbers (distribution checking)
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:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office