zoukankan      html  css  js  c++  java
  • MATLAB中的randi函数

    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.


  • 相关阅读:
    Java中String做为synchronized同步锁
    99%的人都理解错了GET与POST的区别
    为什么Java中只有值传递
    解决maven打包时,会编译特定文件导致文件不可用
    Java使用icepdf转高清图片
    iText输出中文
    Error:(1, 1) java: 非法字符: ‘ufeff’
    java根据模板生成pdf
    携程Apollo统一配置中心的搭建和使用
    1008
  • 原文地址:https://www.cnblogs.com/rong86/p/3519693.html
Copyright © 2011-2022 走看看