How to create a loop for an arma forecast ?

2 views (last 30 days)
Boris
Boris on 1 Apr 2014
Answered: Boris on 1 Apr 2014
Good afternoon everyone! I hope someone can help me and I am sorry if there is already an answer to a similar question. To the question: I have a data set of 52560, let's call it w(52560x1). What I need to do is to make a forecast for specific part. I already have the ARMA model(amx41) and the code I am using is
yf= forecast(amx41,w(1:8760),24);
xlswrite=('arma.xlsx',yf,1,'A1:A24');
Now what the code is doing: it takes the values from 1 to 8760 of w and creates a prediction based on them for 24 steps, which are recorded in the 'arma.xlsx' file. After this I have to do the same just this time for 23 more values- e.g. w(1:8783) and to record them in A25:A48 in the excel file. Now if I have to change the values manually it will take a lot of time so how exactly to create a loop so that I don't have to make it manually ?
P.S the last w should be (1:52560)
  1 Comment
Salaheddin Hosseinzadeh
Salaheddin Hosseinzadeh on 1 Apr 2014
I didn't know MATLAB has a forecasting function! I used interpolatin previously! It's probably working based on the same princile isn't it?

Sign in to comment.

Answers (1)

Boris
Boris on 1 Apr 2014
Yes, something like this. The forecast values are based on the original values, so they can not exceed it.

Categories

Find more on Thermodynamics & Statistical Physics in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!