Re:matrix printing
- To: mathgroup at yoda.physics.unc.edu
- Subject: Re:matrix printing
- From: "Yuichi Pop Kimura (Col.of Indust.Eng.,Nihon univ.)" <kimura at juno.ka.cit.nihon-u.ac.jp>
- Date: Fri, 21 Jan 1994 10:13:05 +0900
Dear Tom Fister, Please try following sources. WriteFile::usage=" WriteFile[l_,outfile_:\"tmp\"] writes contents in l to outfile with plain format. Contents in outfile is removed before writing. " WriteFile[l_,outfile_String:"tmp"] := Module[ { outstrm, (* output stream *) x,y }, outstrm = OpenWrite[ outfile, PageWidth -> Infinity, FormatType -> OutputForm ] ; Write[ outstrm, TableForm[l, TableSpacing -> {0,2}] ] ; Close[ outstrm ]; Null ] The sample is as follow, matrix={{1,2,3},{4,5,6},{7,8,9}} WriteFile[matrix] After this, you can find the file of "tmp" on the current directory. ========================================= Yuichi Kimura, Ph.D: Dep.of Industrial Eng. & Management, Col.of Industrial Technology, Nihon univ., 1-2-1, Izumi, Narashino, Chiba, 275, Japan TEL:0474(74)2637 FAX:0474(74)2619 CALL SIGN : JN1LXJ