How to forecastng in AR model
조회 수: 2 (최근 30일)
이전 댓글 표시
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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/154802/image.jpeg)
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Weather and Atmospheric Science에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!