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 visualizzazioni (ultimi 30 giorni)
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.

Risposte (2)

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

Accedi per commentare.


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

Community Treasure Hunt

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

Start Hunting!

Translated by