Given is a list with x, y, z coordinates:
{{100, 94, -1.112}, {100.05, 94, -1.112}, {100.1, 94, -0.982}, ..., {100, 94.25, -1.112}, {100.05, 94.25, -0.855}, {100.1, 94.25, -0.728}, ..., {139.95, 114.75, 1.184},{140, 114.75, 1.184}}
I want to split this list into files with y = constant, y should moreover form the name of the new file (see the code below) and only the (x, z) values should be written into the file.
Getting the name for the first file I use this code:
liste = ReadList[inffile, {Number, Number, Number}];
y = liste[[All, 2]];
fil = IntegerString[IntegerPart[First[y]*100], 10, 5];
newfile = ToString[fil] <> ".dat";
wfile = OpenWrite[newfile, FormatType -> TraditionalForm];
Which is the best way to extract now all (x,y,z) with the same y (y = 94) from this list, to write all of them into the new file, and to continue with the next new file with the next y-value (y = 94.25)? Thanks a lot