MATLAB: Sampling data using contraints

constraintsdatasampling

Hi, I want to sample points uniformly in a multidimensional design space, such that the sampled points follow an
equality constraint. Basically I want to sample 4 mole fractions (Xi) for 4 components in an input stream. I have lower
and upper bounds (inequality constraints) for each Xi as well.
Eg. 0.733<=X1<=0.944, 0.04<=X2<=0.093, 0.04<=X3<=0.094, 0.02<=X4<=0.048, X1+X2+X3+X4=1
Is there any way to use the inbuilt sampling techniques like sobol, LHS etc. while ensuring these constraints?

``n = 5;lb = [0.733 0.04, 0.04, 0.02];ub = [0.944, 0.093, 0.094, 0.048];A = [1 1 1 1]b = 1;X = randFixedLinearCombination(n,A,b,lb,ub);``
``>> XX =      0.80603     0.078998     0.093954     0.021013      0.86969     0.041981      0.04217     0.046161      0.82108     0.082301     0.058065     0.038558      0.84723     0.045193     0.085937     0.021644      0.81159     0.055575     0.092472     0.040365      >> sum(X,2)ans =            1            1            1            1            1            >> all(X >= lb,2)ans =  5×1 logical array   1   1   1   1   1   >> all(X <= ub,2)ans =  5×1 logical array   1   1   1   1   1``