• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

MATLAB中的randi函数

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

randi Pseudorandom integers from a uniform discrete distribution.来自一个均匀离散分布的伪随机整数
R = randi(IMAX,N) returns an N-by-N matrix containing pseudorandom integer values drawn from the discrete uniform distribution on 1:IMAX.返回一个N×N的包含伪随机整数值的矩阵,这些整数来自均匀分布IMAX
randi(IMAX,M,N) or randi(IMAX,[M,N]) returns an M-by-N matrix.
randi(IMAX,M,N,P,...) or randi(IMAX,[M,N,P,...]) returns an M-by-N-by-P-by-... array. randi(IMAX) returns a scalar.
randi(IMAX,SIZE(A)) returns an array the same size as A.
R = randi([IMIN,IMAX],...) returns an array containing integer values drawn from the discrete uniform distribution on IMIN:IMAX.
Note: The size inputs M, N, P, ... should be nonnegative integers.
Negative integers are treated as 0.
R = randi(..., CLASSNAME) returns an array of integer values of class CLASSNAME.
The arrays returned by randi may contain repeated integer values. This is sometimes referred to as sampling with replacement. To get unique integer values, sometimes referred to as sampling without replacement, use RANDPERM.

The sequence of numbers produced by randi is determined by the settings of the uniform random number generator that underlies RAND, RANDN, and randi.
randi uses one uniform random value to create each integer random value. Control that shared random number generator using RNG.



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
delphi代码实现窗口最小化,最大化,关闭消息发送发布时间:2022-07-18
下一篇:
在Delphi中操作Mysql发布时间:2022-07-18
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap