???  In an assignment  A(I) = B, the number of elements in B and
I must be the same.

Error in ==> aaaaaaaaaaaaa at 46
offerr_array(j)=2*alpha.*x1+ beta + k .*(D- sum(x1));