MA(1) process without using built-in functions

조회 수: 2 (최근 30일)
Leonardo Aldeghi
Leonardo Aldeghi 2019년 10월 21일
Hi everybody, i'm trying to write a MA(1) process without using built-in functions (homework) and with these input parameters
  • theta (MA parameter)
  • sigma (standard deviation of innovations)
  • epsilon0 (starting value)
  • T (total length of the time series to simulate)
function y = simulateMA1(theta, sigma, epsilon0, T)
y(1)=epsilon0;
for k=2:T
epsilon(k)=(sigma^2)*randn;
y(k)=epsilon(k)+theta*epsilon(k-1);
end
y=y' % shifting to column vector
end
I'm using the grader and no error message comes out, but there is something wrong that i'm missing with the model. Can anybody share his tought about this?
Thankss

답변 (0개)

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by