How to create an array of numbers in simulink?

14 ビュー (過去 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 Center および File ExchangeSources についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by