MATLAB: Spatially colored and temporaly white noise

spatially color noise

How to generate spatially colored and temporaly white noise ? i.e if E is the noise of size (5,100) then the coloumns of E are independent and identically distrubuted according to ek ~ N(0,Q) ,where Q is some positive definite matrix and Q is not equal to identity matrix

Best Answer

Check out randn() in the help. This generates samples drawn from a normal distribution with specified mean and var:
% Create a vector of 1000 random values drawn from a normal distribution
% with a mean of 500 and a standard deviation of 5.
a = 5;
b = 500;
y = a.*randn(1000,1) + b;
% Calculate the sample mean, standard deviation, and variance.
stats = [mean(y) std(y) var(y)]
Related Question