MathGroup Archive 1996

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Formatting Output


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/


  • Prev by Date: Re: Speed of dot product in Mathematica
  • Next by Date: Re: Replace/No Rearrangement
  • Previous by thread: Re: Formatting Output
  • Next by thread: Re: Re: Resource Hog :-(