|
[Date Index]
[Thread Index]
[Author Index]
Re: NDSolve problem with piecewise functions
- To: mathgroup at smc.vnet.net
- Subject: [mg32081] Re: NDSolve problem with piecewise functions
- From: Tom Burton <tburton at cts.com>
- Date: Sat, 22 Dec 2001 04:22:57 -0500 (EST)
- References: <9vuuko$ont$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hello,
On Fri, 21 Dec 2001 09:16:08 +0000 (UTC), in comp.soft-sys.math.mathematica you wrote:
>...
>BigSine[t_] := 2.0 Sin[2 Pi 60.0 t]
>f[t_] := 1.0 /; BigSine[t] > 1.0
>f[t_] := BigSine[t] /; (BigSine[t] < 1.0 && BigSine[t] > -1.0)
>f[t_] := -1.0 /; BigSine[t] < -1.0
>...
I don't know how to get NDSolve to work correctly with conditional functions, but here is a workaround that seems to work fine:
f[t_] := Max[-1, Min[1, BigSine[t]]]
Tom Burton
Prev by Date:
Re: Is this a bug?
Next by Date:
Re: Is this a bug?
Previous by thread:
NDSolve problem with piecewise functions
Next by thread:
Re: bisection method
|