Rand(1,1) generates identical numbers for different blocks of simulink

조회 수: 1 (최근 30일)
Aly Elhefny
Aly Elhefny 2020년 7월 21일
답변: Jalaj Gambhir 2020년 7월 28일
Hello everyone,
Hope you are all in good health.
I have multiple matlab funcitons inside my simulink model and each of those matlab function blocks includes a rand() function for genrating random numbers.
My problem is that for the same timestep, all blocks output the same random number. The following timestep results in a random number different from the previous timestep but again the same for all blocks at this particular time step.
I need to generate different random number for each block at every time step in simulink. How can I achieve that ?
Thanks in advnace
Stay safe

답변 (1개)

Jalaj Gambhir
Jalaj Gambhir 2020년 7월 28일
Hi,
Have a look at the answer here.

카테고리

Help CenterFile Exchange에서 Sources에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by