MathGroup Archive 1995

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

Search the Archive

Formating output of Modules

  • To: mathgroup at
  • Subject: [mg2214] Formating output of Modules
  • From: sherod at boussinesq.Colorado.EDU (Scott Herod)
  • Date: Mon, 16 Oct 1995 11:54:29 -0400
  • Organization: University of Colorado at Boulder

I've got an annoying little problem that I was hoping someone can
help me solve.  I have a Module, NDelaySolve, which returns a
numerical approximation of solutions to differential-delay equations.
In order to make the output look as much like that of NDSolve as
possible, I have the module return something like

{{x[t] -> g[t], y[t] -> f[t]}}

where g[t] and f[t] are often big Which[] functions.  I would like
to reduce the output by creating a DelaySolveFunction[][t] which
looks something like an Interpolating function.

Here is an example:

  Format[spam[x_]] := 1/x;
  spam[a_] := Module[{},
    pop = Table[a,{3}]
  {8, 8, 8}

This Format isn't doing what I want.  I would like spam[8] to return {8,8,8}
but to print the output as 1/8.  If I get this one to work, I could solve
my real problem.

Scott Herod
sherod at

  • Prev by Date: Spherical trig application
  • Next by Date: Re: What am I doing wrong? Please! no more...
  • Previous by thread: Formating output of Modules
  • Next by thread: Re: Formating output of Modules