필터 지우기
필터 지우기

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 CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by