rand command give different answer
이전 댓글 표시

why this rand command give different result
댓글 수: 1
Stephen23
2020년 2월 9일
"why this rand command give different result"
What do you expect its output to be?
답변 (2개)
James Tursa
2020년 2월 9일
편집: James Tursa
2020년 2월 9일
rand( ) is a random number generator ... it is supposed to give a different result.
doc rand
If you want to start over with the same stream of numbers you will need to re-seed it.
댓글 수: 1
Iqra
2023년 1월 6일
beacuse rand function generates value randamly between 0 and 1 interval
Chuguang Pan
2020년 2월 9일
0 개 추천
All the random number functions, rand, randn, randi, and randperm, draw values from a shared random number generator. Every time you start MATLAB, the generator resets itself to the same state.
The rand function draw values from a RandStream.
카테고리
도움말 센터 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!