# Variations in MATLAB plot each time the program is executed

Every time I run the program my PLOT in MATLAB gets changed to some extent (some times to larger extent too).

I understood that the channel is random and this might happen due to random distributions used to model the channel. Is there any way to solve this issue, so that every time I get the same values and plot.

• You have to average over a certain number of channel realizations – Dsp guy sam Jun 6 at 11:15
• I am not sure about how we can answer here. You can stack the plots, to get a cumulative vision of how things change; but I don't know yet why it could be disturbing – Laurent Duval Jun 6 at 11:53
• @ Laurent , it is disturbing because some time Bit error rate curve goes below and some time it goes above. – charu Jun 6 at 12:05
• @ Dsp guy, can you give simple example. – charu Jun 6 at 12:06
• Are you trying to run models with the same sequence of random numbers so it becomes repeatable? If yes, use $rng()$ to control the seed of the random number generator – Hilmar Jun 6 at 13:41