Question: How do I output the real part and imaginary part of complex data into different file?

Hello, I would like to know how to separate the complex date into the real part and imaginary part, then write out the date into two different file. As the following example says, I have the data like this 1.4687+2.2874*I -1.1312+2.4717*I -2.6911+.38360*I 3.9923+6.2177*I -3.0749+6.7188*I -7.3151+1.0427*I 10.852+16.901*I -8.3585+18.264*I -19.885+2.8345*I By using the command, > P := proc(f,x::complex(numeric)) fprintf(f,`%g\t%g`,Re(x),Im(x)) end proc: > writedata(terminal,A,float,P); I have ouput the date into the file as the form like this, 1.468700 2.287400 -1.131200 2.471700 -2.691100 .383600 3.992300 6.217700 -3.074900 6.718800 -7.315100 1.042700 10.852000 16.901000 -8.358500 18.264000 -19 As you can see, both real part number and imaginary part number are in the same file. The question is how could I do to output the real part and imaginary part into the different file? Thanks a lot....
Please Wait...