MathGroup Archive 2008

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

Search the Archive

Re: NDSolve Question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg86357] Re: NDSolve Question
  • From: Jerry <Jer75811 at yahoo.com>
  • Date: Sun, 9 Mar 2008 05:03:12 -0500 (EST)
  • References: <fqtqmp$d82$1@smc.vnet.net>

Sir, I tried this and I only get plot axes, no graph.

f[q_?NumberQ] := q
sol = NDSolve[{x'[t] == f[x[t]], x[0] == 0}, {x}, {t, 0, 1}]
Plot[x[t] /. sol, {t, 0, 1}]

In place of {x} in sol I tried x and x[t] with no change.
In Plot I tried x instead of x[t], no help.

Can you give me a successful example? Thanks.




David Park wrote:
> I found the answer, which is to use:
> 
> f[q_?NumberQ]:= ...
> 
> which prevents an initial evaluation.
> 


  • Prev by Date: Re: How to use Thread when second argument to function is a list of lists?
  • Next by Date: Re: Another Mathematica 6 bug?
  • Previous by thread: Re: NDSolve Question
  • Next by thread: Re: NDSolve Question