Re: Formatting Output
- To: mathgroup at smc.vnet.net
- Subject: [mg5352] Re: Formatting Output
- From: Jens Potschadtke <Jens.Potschadtke at stud.uni-erlangen.de>
- Date: Wed, 27 Nov 1996 01:48:04 -0500
- Organization: Institute for Biomedical Engineering at the FAU Erlangen
- Sender: owner-wri-mathgroup at wolfram.com
Susan Rempe wrote:
>
> I want a combination of string and expression written to a file.
> The output from a Print command is exactly what I want:
>
> In[42]:= gm=Cos[theta];
>
> In[43]:= Print["gm(",12,",",12,")=",FortranForm[gm]];
>
> gm(12,12)=Cos(theta)
>
> Does anyone know how to get that same output written to a file?
>
> Susan Rempe
> rempe at u.washingtonn.edu
Try to play around with the function ToString[FortranForm[...]] in
combination with StringJoin[].
Then you can use
expr >> file
--
Jens Potschadtke
Institute for biomedical engineering at the FAU Erlangen (germany).
mailto:Jens.Potschadtke at stud.uni-erlangen.de
http://www.uni-erlangen.de/~sz0438/