이 제출물을 팔로우합니다
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다
Function that uses RAND to generate random integers in the specified linear range, as follows:
result = floor(a + (b-a+1).* rand(N)),
where specified range is [a b]
-----
Please note: There are lots of ways to do this and lots of interesting submissions on FEX which provide similar results (see below).
random numbers:
#18443 - Random Integer Generator
#5346 - MYRANDINT -- Random Integer Generation
#27942 - WWW.RANDOM.ORG random integers/sequences/strings
#27809 - Unique Random Integer List
#13007 - Random Number Generator
#21353 - True Random Integer Generator (random.org)
random arrangement:
#30189 - RANDPERMFULL (derangement)
#17981 - RANDBLOCK
#27076 - Shuffle
인용 양식
DS (2026). Generate uniform pseudo-random integers from linear range. (https://kr.mathworks.com/matlabcentral/fileexchange/35324-generate-uniform-pseudo-random-integers-from-linear-range), MATLAB Central File Exchange. 검색 날짜: .
| 버전 | 퍼블리시됨 | 릴리스 정보 | Action |
|---|---|---|---|
| 1.4.0.0 | Modified code included as detailed in previous update. |
||
| 1.3.0.0 | Added a check for imaginary and non-integer range specifications. Thanks to Travis B for pointing out this edge-case behavior. |
||
| 1.2.0.0 | Fixed help format to accommodate LOOKFOR queries. |
||
| 1.1.0.0 | Thanks to Jan Simon for suggesting the use of numel instead of abusing the size function (see comments). |
||
| 1.0.0.0 |
