Skip to main content
added 128 characters in body
Source Link
Novice_Developer
  • 1.5k
  • 2
  • 20
  • 35

It creates a 3 dimensional random array x = rand(1:3) is same as

x = rand([1,2,3]) 

you can change the values such that

x = rand([3,2,3]) will create a 3x2x3 elements of random array

Here is a well defined explanation of what rand function does

It creates a 3 dimensional random array x = rand(1:3) is same as

x = rand([1,2,3]) 

you can change the values such that

x = rand([3,2,3]) will create a 3x2x3 elements of random array

It creates a 3 dimensional random array x = rand(1:3) is same as

x = rand([1,2,3]) 

you can change the values such that

x = rand([3,2,3]) will create a 3x2x3 elements of random array

Here is a well defined explanation of what rand function does

Source Link
Novice_Developer
  • 1.5k
  • 2
  • 20
  • 35

It creates a 3 dimensional random array x = rand(1:3) is same as

x = rand([1,2,3]) 

you can change the values such that

x = rand([3,2,3]) will create a 3x2x3 elements of random array