Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
N(0,σ^2*I_dxd) 分布d (次元) can be any numberを使用して、MATLAB でランダム ベクトルを生成したいと考えています。これどうやってするの?前もって感謝します
N(0,σ^2*I_dxd)
分散/共分散行列がσ^2*Iの場合、法線は独立しています。d独立したN(0,σ^2)、またはd標準の法線を生成し、それらを で乗算しますσ。
σ^2*I
d
N(0,σ^2)
σ
必要なコマンドはrandn、入力すれhelp randnばわかるはずです。
randn
help randn
Iあなたが対角線の外側でゼロであると仮定します:
I
randn(length(σ^2*I_dxd),1).*diag(σ^2*I_dxd)
が対角線の外側でゼロでない場合Iは、もう少し複雑になります。