ヘルプ センターヘルプ センター
この例では、平均 500、分散 25 の正規分布から得た浮動小数点数の乱数からなる配列を作成する方法を示します。
関数 randn は、平均 0、分散 1 の正規分布から乱数のサンプルを返します。確率変数の一般理論では、x が確率変数でその平均が μx、分散が σx2 である場合、y=ax+b, (a と b は定数) で定義される確率変数 y の平均は μy=aμx+b、分散は σy2=a2σx2. になります。この概念を応用して、平均 500、分散 25 の正規分布した乱数のサンプルを得ることができます。
randn
rng | randn
rng
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office