- #1
MartinV
- 69
- 0
Hello. I have a question about Mathematica.
I have a series of files named P1.txt, P2.txt, etc. Each file contains 200 pairs of coordinates [x,y]. I want to write a loop that would import each of these files in turn, process them with NSolve, and then export the output files as Q1.txt, R1.txt, Q2.txt, etc. NSolve returns three solutions for each inputed file.
I can't seem to make Mathematica to create files with names according to the number of the loop. Can anyone help?
I have a series of files named P1.txt, P2.txt, etc. Each file contains 200 pairs of coordinates [x,y]. I want to write a loop that would import each of these files in turn, process them with NSolve, and then export the output files as Q1.txt, R1.txt, Q2.txt, etc. NSolve returns three solutions for each inputed file.
I can't seem to make Mathematica to create files with names according to the number of the loop. Can anyone help?