Discrete Time Gaussian Random Process for a sequence

조회 수: 6 (최근 30일)
PRASHANTH S
PRASHANTH S 2022년 11월 20일
편집: Kartikay Sapra 2022년 11월 23일
Consider a discrete time random process, each outcome of an experiment produces a sequence
of IID, zero-mean Gaussian random variables, W1,W2,W3.....Wn, n= 20. Write the
MATLAB code for generating this process.

답변 (1개)

Kartikay Sapra
Kartikay Sapra 2022년 11월 23일
편집: Kartikay Sapra 2022년 11월 23일
In order to create sequence of IIDs that are Gausian Random Variables, use the 'normrnd' function:
Please note the following example:
time_steps = 100; %Each iteration for the random process/number of simulations
for t = 1:time_steps
%DTRP: Discrete Time Random Process, stores the IIDs at every time step.
%creating a column vector of W1, W2, ...Wn, n=20 IIDs with mean = 1 and
%standard deviation = 1.
DTRP{t} = normrnd(0, 1, [20 1]);
end
%Displaying the random variables at t=1
DTRP{1}
ans = 20×1
1.4673 0.2652 -0.4163 -0.5958 0.3486 0.5809 -2.3177 1.4564 0.3297 -1.3770

카테고리

Help CenterFile Exchange에서 Random Number Generation에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by