Student Support Forum: 'Debugging, for loops and compile' topicStudent Support Forum > General > Archives > "Debugging, for loops and compile" |
I have trouble debugging code in Mathematica. Is there no stepping tool? I really like to jump in my for loops and take one step at a time. It seems I have to use Print instead to constanctly print values, and this is far more tricky.
Also is there a way to get color coding in mathematica? The code is very hard to read when it's all black.
Also. I have noted that nested for loops are not very fast. I have tried the Compile function, but it doesn't seem like i can use normal distributed random numbers inside compiled functions. Is there a way around this. How do you all create complex simulations with say random walks for a large number of particles?
Thanks for your help