MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   如何生成在区间[-1,1]之间的服从正态分布N(0,1)的随机数 (https://www.labfans.com/bbs/showthread.php?t=2421)

yyxgy 2008-04-19 15:04

如何生成在区间[-1,1]之间的服从正态分布N(0,1)的随机数
 
我采用randn*2-1,可是还是不行,望高手指教

fgabertb 2008-04-19 17:31

normal 的範圍是 正負無窮大

如果限制只取 + -1 之間

即使是用randn生成出來的

也不能叫做 normal 亂數
:smile:


所有时间均为北京时间。现在的时间是 08:55

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.