필터 지우기
필터 지우기

pseduo decimal randeom number

조회 수: 1 (최근 30일)
sudhir keshari
sudhir keshari 2021년 5월 6일
편집: David Goodmanson 2021년 5월 7일
can anyone have MATLAB code for pseduo decimal random number generator. pseduo decimal random number generator is initiated with some seed value which also has decimal number. It is iterative mathematical equcation.
  댓글 수: 5
sudhir keshari
sudhir keshari 2021년 5월 7일
pseduo decimal random number genartor means that generate the decimal random number by given seed value that is also in decimal form. for example: seed value is : 2.5564 and after applying this seed value and total count of random numbers in that equcation, i can obtain the decimal random numbers. whenever, i applied same seed value in that equcation in future, same sequence of numbers are generated.
David Goodmanson
David Goodmanson 2021년 5월 7일
편집: David Goodmanson 2021년 5월 7일
Hi sudir,
rng(12345)
rand(1,8)
rand(1,8)
disp('reset')
rng(12345)
rand(1,8)
rand(1,8)
ans = 0.9296 0.3164 0.1839 0.2046 0.5677 0.5955 0.9645 0.6532
ans = 0.7489 0.6536 0.7477 0.9613 0.0084 0.1064 0.2987 0.6564
reset
ans = 0.9296 0.3164 0.1839 0.2046 0.5677 0.5955 0.9645 0.6532
ans = 0.7489 0.6536 0.7477 0.9613 0.0084 0.1064 0.2987 0.6564
see help rng
From the Mathworks website: "A flag is a request to an editor to review and potentially close or delete content on MATLAB Answers". Flags are generally reserved for duplicate questions, totally off-topic questions, out-and-out spam etc. Since that does not apply here, it would be best if you deleted the flags.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by