フィルターのクリア

how to get same values when using random function

2 ビュー (過去 30 日間)
Elysi Cochin
Elysi Cochin 2013 年 12 月 31 日
回答済み: Walter Roberson 2013 年 12 月 31 日
is it possible to get same values when using random function....
that is, when i do rand(4)
i should always get same value whenever i execute... is it possible, if possible can someone help me how to do it.... i'm using matlab 7.9..... please do reply...

採用された回答

Walter Roberson
Walter Roberson 2013 年 12 月 31 日
If you want to reproduce a sequence of random values, see rng() to set the random number seed.
If you want to have rand() return the exact same value every time it is called, then create your own rand() routine and have it earlier on the MATLAB path than the standard rand() routine.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by