How to create a loop for an arma forecast ?

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 件のコメント

Salaheddin Hosseinzadeh
Salaheddin Hosseinzadeh 2014 年 4 月 1 日
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?

サインインしてコメントする。

回答 (1 件)

Boris
Boris 2014 年 4 月 1 日

0 投票

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

カテゴリ

質問済み:

2014 年 4 月 1 日

回答済み:

2014 年 4 月 1 日

Community Treasure Hunt

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

Start Hunting!

Translated by