MathGroup Archive 2008

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

Search the Archive

Traditional Ordering of Equations

  • To: mathgroup at smc.vnet.net
  • Subject: [mg88766] Traditional Ordering of Equations
  • From: Joost Keuskamp <joost at averechts.nl>
  • Date: Fri, 16 May 2008 05:30:33 -0400 (EDT)

As a beginner in Mathematica I am using Mathematica 6.0 for integration and simplification of a number of functions which I subsequently use in a Fortran program. Now I have two questions which I cannot find the answer to in the documentation or forums:

- Is there a way to prevent Mathematica from reordering a function to its standard order upon evaluation?

- I want to list all resulting functions in one cell, as can be done using the Print and Fortranform commands. I want the list to look like this:


FunctionName1 = Function1
FunctionName2 = Function2
FunctionName3 = Function3
etc.

All these functions were defined earlier in the notebook using the following syntax:

FunctionName1 = Function1

I tried writing a new Mathematica function to do this:

FortranFormulas[ff_] := 
 Print[HoldForm[ff] "=" FortranForm[ff]]
FunctionNameList = {NO3inYt, NO3outYt}
Scan[FortranFormulas, FunctionNameList]

However, this generates an output like:
= Function1inFortranForm Function1
= Function2inFortranForm Function2

The alternative:
FortranFormulas[ff_] := 
 Print[ff] "=" FortranForm[Release[ff]]]
FunctionNameList = {HoldForm[NO3inYt], HoldForm[NO3outYt]}
Scan[FortranFormulas, FunctionNameList]

generates an output like:
= FunctionName1 FunctionName1
= FunctionName2 FunctionName2

Both are incorrect and in the wrong order.

I don't know what to do now and was hoping that anyone had a suggestion.. ..many thanks in advance!


  • Prev by Date: Re: export mathematica table to .mat (MATLAB) format.Please help!!!
  • Next by Date: Re: Asking NonlinearRegression
  • Previous by thread: remote Kernel
  • Next by thread: Re: Traditional Ordering of Equations