MATLAB: To simulate Gaussian white random process.

MATLAB

(This question has been removed)

Best Answer

You can generate the noise vector like this
t = linspace(0, 6, 100); % 100 time samples between 0 and 5
x = zeros(size(t)); % noise vector
idx = 2 < t & t < 5;
x(idx) = randn(1, nnz(idx))*9; % N(0, sigma=9)

or If you have Statistical and Machine learning toolbox
x(idx) = normrnd(0, 9, 1, nnz(idx)); % N(0, sigma=9)