Re: Re: Export Complex Matrices
- To: mathgroup at smc.vnet.net
- Subject: [mg40774] Re: [mg40747] Re: Export Complex Matrices
- From: Kyriakos Chourdakis <tuxedomoon at yahoo.com>
- Date: Thu, 17 Apr 2003 03:33:30 -0400 (EDT)
- Reply-to: k.chourdakis at qmul.ac.uk
- Sender: owner-wri-mathgroup at wolfram.com
Jens, I want the matrix to be exported in text format. It has to be read in Fortran eventually. I was thinking that I could export via Excel, but unfortunately CSV is not supported in Mathematica 4.0 K. 16/04/2003 06.35.01, Jens-Peer Kuska <kuska at informatik.uni-leipzig.de> wrote: >Hi, > >I don't know for what system you have to export the data. >If you just want to save it and reread it in Mathematica >Put[COO,"data.m"] > >and > >COO=Get["data.m"] > >may be a good solution. >The CSV format may also help you > >Export["COO.dat", COO, "CSV"]; >!! COO.dat > >gives > >2,3,2.E-9 >3,2,2.*^-9*I > >Regards > Jens > >Kyriakos Chourdakis wrote: >> >> Dear all, >> >> I am trying to export matrices of the form >> >> COO = {{2, 3, 2. 10^-9}, {3, 2, 2. 10^-9 I}} >> >> with I the imaginary unit. It is the coordinate >> representation of large sparse matrices. The first two >> columns are the coordinates, and the third is the >> value. When I use the simple >> >> Export["COO.dat",COO] >> >> I guess Mathematica recognises the imaginary part as string, >> and exports >> >> 2 3 2.e-9 >> -9 >> 3 2 2. 10 I >> >> instead of >> >> 2 3 2.e-9 >> 3 2 2.e-9 I >> >> I am sure there is a simple way to get around the >> problem, but I can't find it.. >> >> I am using Mathematica 4.0 on Windows Me. >> >> Best >> >> K. >> __________________________________________________ Yahoo! Plus For a better Internet experience http://www.yahoo.co.uk/btoffer