Let's suppose I have a code like this:
ClearAll["Global`*"]
a = 2;
b = 3;
Sab=*lots of calculations on a and b*
Save["S" <> ToString[a] <> "" <> ToString[b] <> ".m",{Sab}]
This codes construct the set Sab for a=2 and b=3 and saves a file called "S23.m". Now... I have another code like this:
ClearAll["Global`*"]
a = 2;
b = 3;
Sab=*lots of calculations on a and b*
* . . . Lots of calculations on Sab . . . *
* . . . Some results . . . *
I would like to use Get in the second code to use the sets Sab that were previously calculated, so I wouldn't need to calculate them again, but these files depend on the inputs a and b. I tried, for example,
<< "S" <> ToString[a] <> "" <> ToString[a] <> "half.m"
but it doesn't work. How can I do it?
Get[ "S" <> ToString[a] <> "" <> ToString[a] <> "half.m"], see linked topic for explanation and let me know if you disagree with closing – Kuba May 26 '18 at 20:31<<reads just names, whileGotcan read a stream [this was taken from documentation]. Anyway... Should I delete this question? – Filburt May 26 '18 at 21:58