找回密码
 注册
Simdroid-非首页
查看: 104|回复: 0

均匀分布的随机数到底包含端点不?!

[复制链接]
发表于 2019-4-28 21:04:37 | 显示全部楼层 |阅读模式 来自 北京
matlab,版本R14中关于rand函数,有下面两句。
第一句:
The rand function generates arrays of random numbers whose elements are uniformly distributed in the interval (0,1).
第二句:
  Generate a uniform distribution of random numbers on a specified interval [a,b]. To do this, multiply the output of rand by (b-a) then add a. For example, to generate a 5-by-5 array of uniformly distributed random numbers on the interval [10,50] a = 10; b = 50;
x = a + (b-a) * rand(5)
x =

   18.1106   10.6110   26.7460   43.5247   30.1125
   17.9489   39.8714   43.8489   10.7856   38.3789
   34.1517   27.8039   31.0061   37.2511   27.1557
   20.8875   47.2726   18.1059   25.1792   22.1847
   17.9526   28.6398   36.8855   43.2718   17.5861

请问:
随机数到底包含端点不?

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|小黑屋|联系我们|仿真互动网 ( 京ICP备15048925号-7 )

GMT+8, 2024-3-29 09:05 , Processed in 0.025029 second(s), 11 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表