Q:

How to generate a random vector of distribution N(0, sigma^2 * Identity matrix (dxd)) in matlab

I want to generate a random vector in MATLAB with the distribution N(0,σ^2*I_dxd)
d (dimension) can be any number .  How can I do this?  Thanks in advance

A:

If the variance/covariance matrix is σ^2*I, then the normals are independent.   Generate d independent N(0,σ^2), or d standard normals and multiply them by σ.