MathGroup Archive 1999

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

Search the Archive

ndsolve with discrete, piecewise variable

  • To: mathgroup at
  • Subject: [mg17160] ndsolve with discrete, piecewise variable
  • From: "Oscar Stiffelman" <ostiffel at>
  • Date: Sun, 18 Apr 1999 00:59:44 -0400
  • Organization: SBC Internet Services
  • Sender: owner-wri-mathgroup at


Can anyone tell me if NDSolve can be used for the following problem?

I would like to construct a system of differential equations and then use a
list of data points (piecewise) as the value of one of the variables.

For example, I might want to build a filter (electrical) where the input
could be any arbitrary signal, not just a clean mathematical signal.   I
would like to see the system's response (time-domain value of a specific
variable) to the input values.

Is it possible to evaluate this in a discrete manner?  For example, could I
solve the system using NDSolve and then use the interpolating function in
the following manner:

1.  set the "input" variable equal to the first element in the list, and set
the other variables equal to some arbitrary starting condition (i.e. zero)
2.  evaluate the system using the interpolating function, saving the values
of every  variable
3.  set the "input" variable equal to the next element in the list, and set
the other variables equal to the saved value, and goto 2.

I would prefer, however, to treat the data points as if they were discrete
samples of a continuous function, and for Mathematica to generate continuous
response (also discretely sampled, of course).

As an analogy, I believe SPICE has the ability to simulate circuits with
piecewise time-domain voltages specified for a single node.  This is
precisely what I want to do in Mathematica, but I would like to do it for
systems other than electrical circuits.

I appreciate any feedback, advice, etc.


Oscar Stiffelman
Stanford University Computer Science Department,  Masters Student in AI

  • Prev by Date: Infinite precision
  • Next by Date: Display cannot be used during intialization message
  • Previous by thread: Re: Infinite precision
  • Next by thread: Re: ndsolve with discrete, piecewise variable