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 (최근 30일)
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.

답변 (2개)

Fangjun Jiang
Fangjun Jiang 2020년 8월 10일
rand()
  댓글 수: 1
Ali Hajnayeb
Ali Hajnayeb 2020년 8월 10일
Actually, "randn()" is better and creates numbers with normal distribution, but the variance of the output of the ODE would not match Simulink.

댓글을 달려면 로그인하십시오.


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

카테고리

Help CenterFile Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by