Apologies if this is a trivial question. It comes from an overall problem I am having with Mathematica. Specifically, within a
Do I generated the elements of a (vector) list but it doesn't remember these outside the
The general problem is the
Do performs a fairly lengthy sequence of calculations including a numerical integration that I need done for a list (in i) of different k values, and so I want to not just plot the results but save them indefinitely for future use and not having to recompute the integrals every time. So, I am trying to assign secondary lists
s[[i]]= inside the
Do which it prints out ok inside the
Do, but doesn't remember them after outside.
Overall I am having trouble transitioning to Mathematica's one-liner format from writing a long sequenced
Do loop in Fortran or Basic.