Discrete Time Gaussian Random Process for a sequence
4 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
回答(1 个)
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}
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Random Number Generation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!