%% Simulate ARIMA Model
% Create an arima model object for the random walk represented in this equation:
% y_t=y_{t-1}+\varepsilon_t,
% where \varepsilon_t is a series of iid Gaussian random variables with mean 0 and variance 1.

Mdl = arima(0,1,0);
Mdl.Constant = 0;
Mdl.Variance = 1;
Mdl

% Mdl is a fully specified arima model object.
% Simulate and plot 1000 paths of length 100 from the random walk.

rng(1) % For reproducibility
Y = simulate(Mdl,100,'NumPaths',1000);
plot(Y)
title('Simulated Paths from Random Walk Process')

% Copyright 2019 The MathWorks, Inc.