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 vues (au cours des 30 derniers jours)
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.

Réponses (2)

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

Connectez-vous pour commenter.


Ali Hajnayeb
Ali Hajnayeb le 10 Août 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