Q:

Generate a 2 x 3 matrix of random

0
  1.  real numbers, each in the range (0, 1)
  2. real numbers, each in the range (0, 10)
  3. integers, each in the inclusive range from 5 to 20  

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Answers :

1/ >> rand(2,3)

ans =

 0.0215 0.7369 0.7125

 0.7208 0.4168 0.1865

   

2/ >> rand(2,3)*10

ans =

 8.0863 2.2456 8.3067

 2.9409 4.0221 5.0677

 

3/>> randi([5, 20],2,3)

ans =

 18 17 5

 11 11 7

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now