Re: Re: How can I "perturbate" a NDSolve
- To: mathgroup at smc.vnet.net
- Subject: [mg102125] Re: [mg102035] Re: [mg102000] How can I "perturbate" a NDSolve
- From: Iván Lazaro <gaminster at gmail.com>
- Date: Thu, 30 Jul 2009 05:31:33 -0400 (EDT)
- References: <200907260754.DAA18931@smc.vnet.net>
Thanks again for all the answers. After studying the examples and
explanations, i could make what i want to.
DrMajorBob was right. A punctual perturbation doesn't change the trayectory,
so I make the perturbation over several time steps. The random work was made
before the NDSolve computation, and I use it to randomly perturbate time
intervals. The following non-real example shows what I say.
Time = 50;
antlist = {};
ant = 2;
Do[
If[RandomReal[] < 0.2, {
If[ant <= j <= ant + 3, 5 + 3, {
AppendTo[antlist, ant];
Print[ant, " ", j];
ant = j}]; }],
{j, 1, Time}];
Equa1[] := x'[t] == Piecewise[
Flatten[Table[
{{x[t] - RandomReal[], antlist[[k]] <= t < antlist[[k]] + 3}}, {k, 2,
Length[antlist] - 1}], 1], x[t]]
Maybe it is not "good-looking", but it works well.
Thanks again to everybody.
- References:
- How can I "perturbate" a NDSolve expresion?
- From: Iván Lazaro <gaminster@gmail.com>
- How can I "perturbate" a NDSolve expresion?