I export the data from the table "mydata1" in CSV format to the file "file1.dat". The following is the math code:
mydata1=TableForm[Flatten[ Table[Table[Table[ {xcord, ycord, zcord}, {xcord, 0,50,10}], {ycord,0,50,10}], {zcord, 50, 100, 10}], 2]]; Export["file1.dat",mydata1,"CSV"]
Now my file1.dat file looks like this:
0,0,50 10,0,50 20,0,50 .. .. and so on
Now I have another dataset from the table "mydata2" (the code below). I want to save the data from this table "mydata2" into one file "file1.dat". But before I do this I need to write the text in the file "file1.dat", for example, "The data below is from mydata2".
Pay attention to both data from both tables that need to be exported in CSV format.
mycounter=20 mydata2=TableForm[Flatten[ Table[Table[Table[ {++mycounter,xcord, ycord, zcord}, {xcord, 0,50,10}], {ycord,0,50,10}], {zcord, 50, 100, 10}], 2]];
at the end, my data file "file1.dat" should look like this:
*Data from data from mydata1 0,0,50 10,0,50 20,0,50 ... and so on *Below data from mydata2 21,0,0,50 22,10,0,50 23,20,0,50 ... and so on.
If you observe the final data file, "file1.dat" should have data from the table "mydata2" below the data from "mydata1", and there is written text between them.
Note. I am ready to export data with TXT extension, but in CSV format. For instance:
Export["file1.txt", mydata1, "CSV"]
I used "PutAppend", but it did not give me the desired results. Either I am not using it correctly, or perhaps this is not a keyword for my problem.
I have many questions regarding exports, but I would not ask for it now, since I do not want to confuse all of you.