How to forecastng in AR model

2 次查看(过去 30 天)
Jeong_evolution
Jeong_evolution 2016-7-12
Hi.guys.
I want to forecasting like this ↓
tic
data = iddata(sin(0.1*[1:100])',[]);
plot(data)
sys = ar(data,2);
K = 100;
p = forecast(sys,data,K);
plot(data,'b',p,'r'), legend('measured','forecasted')
toc
And I try this ↓
data = iddata(g_Fresult_data_4{1,1}(:,3),[]) ;
plot(data) ;
sys = ar(data,2);
K = 98 ;
p = forecast(sys,data,K);
plot(data,'b',p,'r'), legend('measured','forecasted')
g_Fresult_data_4{1,1}(:,3),[] is 98x7 double in 1x1 cell structure. (weather data)
WD WS T H HI UV AP
260.542 3.138 11.111 51.666 249.800 8.666 998.825
210.237 3.235 11.577 50.800 274.266 10.200 998.827
226.260 3.186 12.085 49.066 359.000 12.066 998.581
230.127 3.127 12.777 47.800 328.800 11.866 998.617
. . . . . . .
. . . . . . .
But plot is resulted below picture.
I do not know yet.. because it is the first time forecasting. I think 'sys=ar~' will be revised. help me.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Model Predictive Control Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by