[Date Index] [Thread Index] [Author Index]
Ferruccio Renzoni wrote: > > > Hi All, > > I need to write on file a matrix 100*100 (numerics) produced by Mathematica > in order to read it with a Fortran program (I am not very good with MathLink, > so that's the easiest solution for me to make a "link" between the two > programs). The writing takes too long (it has to be repeated several times). > Which is the fastest way of writing on file compatible with Fortran? > > Please e-mail. > > Thanks in advance > Ferruccio > > > -- Make the matrix a huge string. Then use the string manipulation commands to remove the commas and brackets and insert return characters. Write the string to file. Note that in Mma3.0.0, the file I/O is very slow, much slower than in Mma2.2. This is remedied in Mma3.0.1. Perhaps the Mma3.0.0 patch might help. You can get a patch from Wolfram, but it is not on their website, so you have to call them up.