How can I create a random input similar to "band-limited white noise", but in an m-file in an ODE to solve with ode45?

4 visualizaciones (últimos 30 días)
I would like to write an m-file in which an ordinary differential equation is defined.
I have to add a gaussian white noise to that. I have created a file in Simulink for that, but I am not able to write similar code.

Respuestas (2)

Fangjun Jiang
Fangjun Jiang el 10 de Ag. de 2020
rand()
  1 comentario
Ali Hajnayeb
Ali Hajnayeb el 10 de Ag. de 2020
Actually, "randn()" is better and creates numbers with normal distribution, but the variance of the output of the ODE would not match Simulink.

Iniciar sesión para comentar.


Ali Hajnayeb
Ali Hajnayeb el 10 de Ag. de 2020
Actually, "randn()" is better and creates numbers with normal distribution, but the variance of the output of the ODE would not match Simulink.

Categorías

Más información sobre Ordinary Differential Equations en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by