Skip to main content
added 332 characters in body
Source Link
Bill Watts
  • 8.6k
  • 1
  • 14
  • 32

One way to make random noise over the range t = 0 to 10:

ttab=Table[i/10,{i,0,100}]; Noisetab=Table[Random[Real, {-1/10, 1/10}], {101}] Noise=Interpolation[Table[{ttab[[i]],Noisetab[[i]]},{i,101}]] 

Plot the noise.

Plot[Noise[t],{t,0,10}] 

enter image description here

You can then add Noise[t] to your differential equation. If you want more or fewer points in your noise or a different range, you can make adjustments.

Editing your NDSolve statement and plotting:

sys = NDSolve[{Derivative[1][x][t] == ArcTan[1*D[f, x[t]]] + Noise[t], x[0] == xs}, {x}, {t, 0, 10}] Plot[{Evaluate[x[t] /. sys], xe}, {t, 0, 10}, PlotRange -> All, PlotPoints -> 40] 

enter image description here

One way to make random noise over the range t = 0 to 10:

ttab=Table[i/10,{i,0,100}]; Noisetab=Table[Random[Real, {-1/10, 1/10}], {101}] Noise=Interpolation[Table[{ttab[[i]],Noisetab[[i]]},{i,101}]] 

Plot the noise.

Plot[Noise[t],{t,0,10}] 

enter image description here

You can then add Noise[t] to your differential equation. If you want more or fewer points in your noise or a different range, you can make adjustments.

One way to make random noise over the range t = 0 to 10:

ttab=Table[i/10,{i,0,100}]; Noisetab=Table[Random[Real, {-1/10, 1/10}], {101}] Noise=Interpolation[Table[{ttab[[i]],Noisetab[[i]]},{i,101}]] 

Plot the noise.

Plot[Noise[t],{t,0,10}] 

enter image description here

You can then add Noise[t] to your differential equation. If you want more or fewer points in your noise or a different range, you can make adjustments.

Editing your NDSolve statement and plotting:

sys = NDSolve[{Derivative[1][x][t] == ArcTan[1*D[f, x[t]]] + Noise[t], x[0] == xs}, {x}, {t, 0, 10}] Plot[{Evaluate[x[t] /. sys], xe}, {t, 0, 10}, PlotRange -> All, PlotPoints -> 40] 

enter image description here

Source Link
Bill Watts
  • 8.6k
  • 1
  • 14
  • 32

One way to make random noise over the range t = 0 to 10:

ttab=Table[i/10,{i,0,100}]; Noisetab=Table[Random[Real, {-1/10, 1/10}], {101}] Noise=Interpolation[Table[{ttab[[i]],Noisetab[[i]]},{i,101}]] 

Plot the noise.

Plot[Noise[t],{t,0,10}] 

enter image description here

You can then add Noise[t] to your differential equation. If you want more or fewer points in your noise or a different range, you can make adjustments.