Shiang-Yi Han

4 Reputation

4 Badges

15 years, 280 days

MaplePrimes Activity

These are questions asked by Shiang-Yi Han

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
Page 1 of 1