For Loop Problem in Mathematica

  • Context: Mathematica 
  • Thread starter Thread starter EngWiPy
  • Start date Start date
  • Tags Tags
    Loop Mathematica
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
3 replies · 25K views
EngWiPy
Messages
1,361
Reaction score
61
Hello,
I want to execute a multiline code for each value of the for loop. How can I do that?
Regards
 
Physics news on Phys.org
DaleSpam said:
For[
i = 0, i < n, i++,
line1;
line2;
line3
]

Thanks DaleSpam. I used ',' instead of ';', which was not accepted by Mathematica. This saves a lot of effort.
Best regards