Hi all,
I have a following code below, where I generate a matrix and lots of data, and finally I print out that data into one .dat file.
Now I would like to share these data into many files, e.g. 4 .dat files in a continual way.
To see what I am talking about, check my code in the attachment!
I would like to have 4 .dat files. For example if I generate N=100 numbers then I would like to have data1.dat file containing number of 25 entries, data2.dat file with 50 entries, data3.dat file with 75 entries, and data4.dat having num. 100 entries.
In the "for" loop I originally have datavecA.dat and datavecB.dat. Instead of these now I would like to have 4-4 files, i.e. datavecA_1. dat, datavecB_1.dat; datavecA_2.dat, datavecB_2.dat; ...etc.
I think I should use if-else if statement, but I am not sure about that... :(
Thank you in advance!