当前位置:网站首页>matlab randint,Matlab的randint函数用法「建议收藏」
matlab randint,Matlab的randint函数用法「建议收藏」
2022-07-25 15:23:00 【全栈程序员站长】
大家好,又见面了,我是你们的朋友全栈君。
RANDINT Generate matrix of uniformly distributed random integers.
OUT = RANDINT generates a “0” or “1” with equal probability.
OUT = RANDINT(M) generates an M-by-M matrix of random binary numbers.
“0” and “1” occur with equal probability.
OUT = RANDINT(M,N) generates an M-by-N matrix of random binary numbers.
“0” and “1” occur with equal probability.
OUT = RANDINT(M,N,IRANGE) generates an M-by-N matrix of random integers.
IRANGE can be either a scalar or a two-element vector:
Scalar : If IRANGE is a positive integer, then the output integer
range is [0, IRANGE-1]. If IRANGE is a negative integer,
then the output integer range is [IRANGE+1, 0].
Vector : If IRANGE is a two-element vector, then the output
integer range is [IRANGE(1), IRANGE(2)].
OUT = RANDINT(M,N,IRANGE,STATE) causes RAND to use the generator
determined by the ‘state’ method, and initializes the state of that
generator using the value of STATE.
Examples:
out = randint(2,3) out = randint(2,3,4)
out = out =
0 0 1 1 0 3
1 0 1 2 3 1
out = randint(2,3,-4) out = randint(2,3,[-2 2])
out = out =
-3 -1 -2 -1 0 -2
-2 0 0 1 2 1
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/127601.html原文链接:https://javaforall.cn
边栏推荐
猜你喜欢

Distributed principle - what is a distributed system

Solve the timeout of dbeaver SQL client connection Phoenix query

Outline and box shadow to achieve the highlight effect of contour fillet

matlab 如何保存所有运行后的数据

理解“平均负载”

Spark 内存管理机制 新版

打开虚拟机时出现VMware Workstation 未能启动 VMware Authorization Service

No tracked branch configured for branch xxx or the branch doesn‘t exist. To make your branch trac

ML - Speech - advanced speech model

谷歌云盘如何关联Google Colab
随机推荐
matlab--CVX优化工具包安装
PageHelper does not take effect, and SQL does not automatically add limit
Is it safe to open futures online? Which company has the lowest handling charge?
JVM-参数配置详解
分布式 | 实战:将业务从 MyCAT 平滑迁移到 dble
Graph theory and concept
Spark获取DataFrame中列的方式--col,$,column,apply
看到很多App出现闪烁的图片,特别是会员页面
JVM garbage collector details
ML - natural language processing - Basics
Outline and box shadow to achieve the highlight effect of contour fillet
How spark gets columns in dataframe --column, $, column, apply
反射-笔记
Iframe nested other website page full screen settings
延迟加载源码剖析:
How to finally generate a file from saveastextfile in spark
Maxcompute SQL 的查询结果条数受限1W
Word 样式模板复制到另一文档
matlab---错误使用 var 数据类型无效。第一个输入参数必须为单精度值或双精度值
苹果内购和Apple Pay 的区别