I am trying to delay a signal by a certain number of samples. This certain number, I would like to generate using a random normal distribution in Matlab. I am using the following for generating the number of samples r = randn(1,1)/sampleTime. This however generates negative numbers too. In order to avoid the negative numbers, I am taking the absolute value of r but I know that this is not the right way, since in this case I would be ignoring the left part of the distribution. Is there a way I can use just positive samples without shifting the mean too much?
Normal distribution regardless of whatever mean and variance you provide, can still produce large positive and negative numbers(albeit with a small probability).
Do you want to specifically use normal distribution, or all you need is a random delay generator? If latter is the case, you can use rand() from MATLAB, also you could use randi if you need integer delays.
Also you could use something like this to generate uniformly distributed random numbers in a specific range.