필터 지우기
필터 지우기

How to create an array of numbers in simulink?

조회 수: 9 (최근 30일)
Siavash
Siavash 2015년 2월 12일
댓글: Siavash 2015년 2월 13일
Hi guys
In Matlab when you want to create an array of random number you can easily use "rand" function. In simulink if you want to create such an array you should use "random number block" which is okay but it will change the numbers based on the model running time. If you want to define an interval in "Constant" block which is independent from running time, you can write 1:10 but it is not randomly normal. How can i create such a random number in simulink without relying on model time?
Thanks alot

채택된 답변

A Jenkins
A Jenkins 2015년 2월 12일
Put
rand(1,10)
in your constant block.
  댓글 수: 1
Siavash
Siavash 2015년 2월 13일
WOW. Thanks man i didn't even try that.

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

추가 답변 (0개)

카테고리

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