generate twenty points within the rectangle defined by (0,0) left boom coner and (8,6) right top corner
1 view (last 30 days)
Show older comments
generate twenty points within the rectangle defined by (0,0) left boom coner and (8,6) right top corner in a matrix form(20*2)
0 Comments
Answers (1)
Walter Roberson
on 25 Jan 2016
For continuous values in a uniform distribution, use
rand(SIZE_OF_ARRAY) * (MaximumValue - MinimumValue) + MinimumValue
You would do that independently for the two coordinates.
0 Comments
See Also
Categories
Find more on Random Number Generation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!