function [ beta,PROBLEM] = getcoefxx( mstar,sigma,ixx,MAXTRYS,N,L,vargin )
PROBLEM=0;
%
if nargin>6
    ex=vargin(1);
else
    ex=3;
end
vstar=kron(sigma,ixx);
cvstar=cholx(vstar);
check=-1;
tryx=1;
   while check<0 && tryx<MAXTRYS
beta=mstar+(randn(1,N*(N*L+ex))*cvstar)';

CH=stability(beta,N,L,ex);
    if CH==0
    check=10;
    else
      tryx=tryx+1;
    end
   end
   if CH>0
       PROBLEM=1;
   end
   


end

