How to modify my 1D random walk sequence to a reflecting type random walk?
1 view (last 30 days)
I have a sequence 'x' generated as below (for simulating 1D random walk):
If I consider 2 values in the sequence , say +10 and -10, then I would like to reflect the sequence 'x' when it reaches those values. How to achieve this?