Multiple choice general knowledge

The MATLAB command ‘rand’ gives you a value between these two numbers

  1. 0 to 1

  2. 0 to 10

  3. 0 and infinity

  4. 0 to 100

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The rand function generates uniformly distributed random numbers between 0 and 1 (excluding 0, including 1 in some implementations). Options B, C, and D are incorrect - rand does not generate values from 0 to 10, 0 to infinity, or 0 to 100 by default.