I am generating a table with 4 columns, wheras only the columns 3 and 4 have the same length.
alloutput =
TableForm[
Table[{10^(j),
Table[{N[10^(i)],
Table[{l,
N[ArcTan[BesselJ[l, y'[l/j]]]] /.
With[{epsilon = 10^(-10), mphi = 10^(i), end = 10^3},
First@NDSolve[{y''[
x] + (0.001^2 + 1/(x)*Exp[-mphi*x/(10^(j)*0.01)] -
l (l + 1)/(x^2))*y[x] == 0, y[epsilon] == 1,
y'[epsilon] == (l + 1)/(epsilon)},
y, {x, epsilon, end}]]}, {l, 0, 5, 1}]}, {i, 0, 1,
1}]}, {j, 2, 3, 1}]]
Now the aim is to export the obtained data in a certain way. Namely to create for each new value in the first column (10^j) a new folder. In this very folder the data from column 3 and 4 should be written seperatly into a data file corresponding to the right value of column 2 (10^i).
Since this might be a bit confusing, I want to give an example:
The values of column 1 are in this example 100 and 1000. So I would like to create the folders with name folder100 and folder1000. In each of both folders then should be generated data files with the name of the value of column 2 (i.e. file1 and file10). Now finally in these data files I would like to write the corresponding values of the columns 3 and 4 in table form.
I guess one has to use CreateDirectory
and ToString
but I dont get it right.