With something like that I Create a vector of 10 random values drawn from a normal distribution with a mean of 15 and a standard deviation of 20.But some values are out of the range [0 50]. As it possible to see from y.
a = 20;
b = 15;
y = a.*randn(10,1) + b;
Do you know how I can change the code, so that it works?