X=zeros(8,8); X(1,:)=ones(1,8); X(2,:)=1.2:0.6:5.4; X(3,:)=X(1,:)+X(2,:); X(4,:)=X(2,:); X(4,[6,8])=0.25; X(5,:)=X(2,:).*X(4,:); X(6,:)=sin(X(3,:)); X(7,:)=cos(pi/8:pi/8:pi); X(8,1:4)=X(7,1:4); X(8,5:8)=X(6,1:4); Beta=[0.1:0.1:0.8]'; Epsilon=repmat([-1,1]',4,1); Y=X*Beta+Epsilon