function x=gen(N,mu,sigma)
x=zeros(N,3);
for i=1:N
    e = 0;
    cond=1;
    while cond
  
        x(i,1)=normt1(mu(1,1),sigma(1,1),0,4.88133);
     
        if rand < 0.5
           x(i,2) = (224/5 - (32*x(i,1))/5 - (2*sqrt(2989 + 896*x(i,1) - 309*x(i,1)^2))/5)/14;         
           x(i,3) = (2*(28 - 4*x(i,1) + sqrt(2989 + 896*x(i,1) - 309*x(i,1)^2)))/35; 
                      
        else
           x(i,2) = (224/5 - (32*x(i,1))/5 + (2*sqrt(2989 + 896*x(i,1) - 309*x(i,1)^2))/5)/14;  
           x(i,3) = (2*(28 - 4*x(i,1) - sqrt(2989 + 896*x(i,1) - 309*x(i,1)^2)))/35; 
        end
        cond = any(x(i,:) < e);
    end   
    
end



