I do not know why anyone would use MATLAB or python when C compilers are free and you can do anything in C. I have written hundreds of programs and millions of lines of code. I have implemented a random walk in C. If you provide more details, I'd be glad to write the code and send it to you if I don't already have it. My book on Monte Carlo Methods (https://www.amazon.com/dp/B07BHWRDSD) is free on these days: 12/18/19, 12/26/19, 1/3/20, 1/11/20. My book on particle tracking that includes random walk with validation (https://www.amazon.com/dp/B07XRWKS6H) is free on these days: 12/25/19, 1/2/20, 1/10/20, 1/18/20. This simulation of diffusion from the MC text is free online.