I'm currently working on handling some experimental data with Mathematica.
I have several files that I basically want to do the same thing with. At the moment, I just copy and paste everything and change the filenames, which looks like this:
rechn1 = Import[
"/path/4He.H2O.MeV14460.ddd.gd.dat", "Table"];
r1 = Length[rechn1];
rechn1a = Take[rechn1, {9, r1}];
plotr1 = ListPlot[rechn1a]
rechn2 = Import[
"/path/4He.H2O.MeV15000.ddd.gd.dat", "Table"];
r2 = Length[rechn2];
rechn2a = Take[rechn2, {9, r2}];
plotr2 = ListPlot[rechn2a]
rechn3 = Import[
"/path/4He.H2O.MeV15670.ddd.gd.dat", "Table"];
r3 = Length[rechn3];
rechn3a = Take[rechn3, {9, r3}];
plotr3 = ListPlot[rechn3a]
and so on. I'm not especially well versed in Mathematica, so this to me seemed like a good option. Copy, paste, change a few numbers.
However, I now have to handle even more data like this. So, is there any way to tell Mathematica to handle all files a certain way? And maybe also to change just a few details? For example, handle everything the same, but have a different PlotStyle or title for the plots?
It would be great to find a way to automate this process a bit, since I have a lot of files to handle now and copy and pasting just isn't an option any more.
Thanks!