i have file, energy consumption of house. every 10 minute 1 value (watt):
10:00 123 10:10 125 10:20 0 ...
it means each day have 144 value (rows). want forecast energy of next day arx armax programm. did write arx code in matlab. can't forecast next day. code take last 5 consumption , forecast 6th one. how can forecast nex 144 value ( = day after)
% arx process---------------------------- l=length(u_in) u_in_id=u_in;% input data used identification u_in_vfy=u_in;% input data used verification y_out_id=y_out;% output data used identification y_out_vfy=y_out;%output data used verification m=5; %parameter used generate order of delay input, output , error n=length(y_out_id)-m; i=eye(n,1)+1; i(1)=i(1)-1; a=i; % initialize matrix y=y_out_id((m+1):end); % defining y vector length(y) na=1; % put output delay 1 m-na in matrix k=1:1:m-na a=[a y_out_id((m-k+1):(end-k))]; end % put "current input -- mth delayed input" matrix p=1:1:m k=p-1; a=[a u_in_id((m-k+1):(end-k))]; end a(:,1)=[]; % delete 1st column of matrix a, used initialize parsol=inv(a'*a)*a'*y; bb=a*parsol; % generate identified output vector based on previous % outputs, current , previous inputs , parameters solved least % square method n=length(y_out_vfy)-m; i=eye(n,1)+1; i(1)=i(1)-1; a=i; k=1:1:m-na a=[a y_out_vfy((m-k+1):(end-k))]; end p=1:1:m k=p-1; a=[a u_in_vfy((m-k+1):(end-k))]; end a(:,1)=[]; % delete 1st column of matrix a, used initialize a; y_out_sysid=a*parsol;
can me?