[comp.sys.mac.misc] Mathematica Help

cabruen@athena.mit.edu (Charles Alan Bruen) (12/08/90)

Hello netters,

	I have two questions about Wolfram's Mathematica. I would
appreciate any possible help available. 

	(1) I have a list in Mathematica {{1,2}, {3,4}, ...} and I want
	to be able to output this into a text file (with no formatting) in
	standard two column format. I have studied the manual and have
	found no method. Alternatively is there a way to simply cut and paste
	it. I am using a Macintosh front end. Basically I need to get data from
	Mathematica into another program.

	(2) I am interested in writing a control-theory program to help
	to teach the basics. I would like to know if anyone has accomplished
	written a shell on top of Mathematica (or Matlab) to utilize the
	commands from mathematica, but have a program in C or Fortran. I
	do not think that Mathematica's command splice will work. However, I
	could be mistaken.


THank you very much for your time. It annoys me when people say to
"email me" because i think the purpose of the net is for everybody to
learn. So unless this is very dumb question  and you dont want to
embaress me, please POST so the world can learn.


-Charles Bruen
 Aero/Astro MIT
 cabruen@athena.mit.edu

cabruen@athena.mit.edu (Charles Alan Bruen) (12/08/90)

Hello netters,

        I have two questions about Wolfram's Mathematica. I would
appreciate any possible help available.

        (1) I have a list in Mathematica {{1,2}, {3,4}, ...} and I want
        to be able to output this into a text file (with no formatting) in
        standard two column format. I have studied the manual and have
        found no method. Alternatively is there a way to simply cut and paste
        it. I am using a Macintosh front end. Basically I need to get data from
        Mathematica into another program.

        (2) I am interested in writing a control-theory program to help
        to teach the basics. I would like to know if anyone has accomplished
        written a shell on top of Mathematica (or Matlab) to utilize the
        commands from mathematica, but have a program in C or Fortran. I
        do not think that Mathematica's command splice will work.
	However, I could be mistaken.


THank you very much for your time. It annoys me when people say to
"email me" because i think the purpose of the net is for everybody to
learn. So unless this is very dumb question  and you dont want to
embaress me, please POST so the world can learn.

                         
-Charles Bruen
 Aero/Astro MIT
 cabruen@athena.mit.edu

knutm@ifi.uio.no (Knut M|rken) (12/10/90)

In article <1990Dec8.021422.25821@athena.mit.edu>, cabruen@athena.mit.edu (Charles Alan Bruen) writes:
> 
> Hello netters,
> 
> 	I have two questions about Wolfram's Mathematica. I would
> appreciate any possible help available. 
> 
> 	(1) I have a list in Mathematica {{1,2}, {3,4}, ...} and I want
> 	to be able to output this into a text file (with no formatting) in
> 	standard two column format. I have studied the manual and have
> 	found no method. Alternatively is there a way to simply cut and paste
> 	it. I am using a Macintosh front end. Basically I need to get data from
> 	Mathematica into another program.
> 
> 	(2) I am interested in writing a control-theory program to help
> 	to teach the basics. I would like to know if anyone has accomplished
> 	written a shell on top of Mathematica (or Matlab) to utilize the
> 	commands from mathematica, but have a program in C or Fortran. I
> 	do not think that Mathematica's command splice will work. However, I
> 	could be mistaken.
> 
> 
> THank you very much for your time. It annoys me when people say to
> "email me" because i think the purpose of the net is for everybody to
> learn. So unless this is very dumb question  and you dont want to
> embaress me, please POST so the world can learn.
> 
> 
> -Charles Bruen
>  Aero/Astro MIT
>  cabruen@athena.mit.edu

Re (1). Try

  f=OpenWrite["filename", FormatType->OutputForm]
  Write[f, MatrixForm[list]]
  Close[f]

where filename is the name of the file you want to write to and list is the matrix
you want to write. 

NB! This gives a blank line between each row of the matrix.

Knut Morken
Institutt for informatikk
University of Oslo
Norway
Email:knutm@ifi.uio.no