function [ X,EX ] = prepare22( data,L,trend )
X=[];
for j=1:L
X=[X lag0(data,j) ];
end
X=[X ones(rows(X),1)];
EX=1;
if trend==1
    X=[X (0:rows(data)-1)'];
    EX=2;
elseif trend==2
    X=[X (0:rows(data)-1)' ((0:rows(data)-1).^2)'];
    EX=3;  
end
end
