I have a big list that contains many 3D- chains (set of points) and for each of them a polynomial. So the structure of my list is for example
list= {{m^2 + l^2 - 1, {{x1, y1, z1}, {x2, y2, z2}, ...}}, {l^3, {{x'1, y'1, z'1}, ...}}
and so on.
Now I want to export all chains in a separate file which have either p1
or p2
as their polynomial. So in a if-loop the syntax would be like
If[
list[[i]][[1]] === (p1 or p2),
Export["list_i.txt", multilist[[i]][[2]], "Table", "FieldSeparators" -> " "]
]
I want to avoid using loops, and I also don't know how to include the current value of i
in the loop in the filename of the export-file.
Does anyone know how to do this without loops? Thanks a lot!
Select
and thenMap
Export
on the preselected chains? $\endgroup$