matlab randi 函数,急求MATLAB的randi函数源代码,我的7.1没有,谢谢谢谢
满意答案
cowboy823
2014.03.08
采纳率:57% 等级:12
已帮助:6451人
%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.
% 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 sequence of numbers produced by RANDI is determined by the internal
% state of the uniform pseudorandom number generator that underlies RAND,
% RANDI, and RANDN. RANDI uses one uniform value from that default
% stream to generate each integer value. Control the default stream using
% its properties and methods. See RANDSTREAM for details about the
% default stream.
%
% Resetting the default stream to the same fixed state allows computations
% to be repeated. Setting the stream to different states leads to unique
% computations, however, it does not improve any statistical properties.
% Since MATLAB uses the same state each time it starts up, RAND, RANDN, and
% RANDI will generate the same sequence of numbers in each session unless
% the state is changed.
%
% Examples:
%
% Generate integer values from the uniform distribution on the set 1:10.
% r = randi(10,100,1);
%
% Generate an integer array of integers drawn uniformly from 1:10.
% r = randi(10,100,1,'uint32');
%
% Generate integer values drawn uniformly from -10:10.
% r = randi([-10 10],100,1);
%
% Save the current state of the default stream, generate 5 integer
% values, restore the state, and repeat the sequence.
% defaultStream = RandStream.getDefaultStream;
% savedState = defaultStream.State;
% i1 = randi(10,1,5)
% defaultStream.State = savedState;
% i2 = randi(10,1,5) % contains exactly the same values as i1
%
% Replace the default stream with a stream whose seed is based on CLOCK, so
% RANDI will return different values in different MATLAB sessions. NOTE: It
% is usually not desirable to do this more than once per MATLAB session.
% RandStream.setDefaultStream(RandStream('mt19937ar','seed',sum(100*clock)));
% randi(10,1,5)
%
% See also RAND, RANDN, RANDSTREAM, RANDSTREAM/RANDI, RANDSTREAM.GETDEFAULTSTREAM.
% Copyright 2008 The MathWorks, Inc.
% $Revision: 1.1.6.2 $ $Date: 2008/09/13 06:57:04 $
% Built-in function.
05分享举报
matlab randi 函数,急求MATLAB的randi函数源代码,我的7.1没有,谢谢谢谢相关推荐
- matlab利用函数 编程求,MATLAB 函数编写方法与应用
试探结构: MATLAB 从 5.2 版本开始提供了一种新的试探式语句结构,其一般的形式为: try 语句段1 catch 语句段2 end 本语句结构首先试探性地执行语句段 1,如果在此段语句执行过 ...
- matlab 函数句柄求导,Matlab_learning_4( 函数句柄 )
含数句柄是MATLAB 6之后特有的语言结构; 优点: 方便函数之间互相调用,兼容函数加载: 拓宽子函数包括局部函数的适用范围: 减少程序设计之中的冗余: 提高重复执行的效率: 数组.结构数组.细胞型 ...
- php编写一个计算相对路径的函数,php求相对路径的函数
求相对路径的函数,写一个函数,算出两个文件的相对路径如 $a = '/a/b/c/d/e.php'; $b = '/a/b/12/34/c.php'; 计算出 $b 相对于 $a 的相路径. $a = ...
- matlab fmincon函数格式,求matlab中fmincon函数格式的中文解释?谢谢!!
fmincon是Matlab优化工具箱(OptimizationToolbox)中的一个命令,用来求有限制条件(约束)的非线性目标函数的极小化问题.x=fmincon(fun,x0,A,b),用于求解 ...
- matlab二元函数驻点,求matlab高手帮忙写个关于对二元函数积分的程序 - 程序语言 - 小木虫 - 学术 科研 互动社区...
clear, clc; %% build matrice m1=[0.8+0.1i,0.5i;0.3i,0.3+0.4i]; m2=[0.1+0.05i,0.2i; 0,0.4+0.9i]; S=[1 ...
- matlab 测量矩阵,急求一个测量矩阵采用分块多项式矩阵时怎样引用的代码!!!
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼 各位大佬们,在压缩感知中,当测量矩阵采用分块多项式矩阵时,怎样写代码,下面是采用高斯矩阵时的代码 clc;clear %% 1. 时域测试信号生成 K=7 ...
- matlab psk 信号,急求···psk信号载频估计的matlab算法
运行不出正确的结果啊···各位高人帮帮忙吧 clear all >> >> D=randint(1,10) N=length(D); ...
- matlab处理图片建系,求MATLAB处理一张图片,把图片放入坐标系,建立类似于经纬度的网格...
图像的分割(算法)比较多,有区域生长法.四叉树法等等. 但是二值图像应当更简单些.一个可能的办法是编写递归函数 来遍历并标注一些种子像素位置周边(相邻)像素,跟围棋求 连通性的方法类似www.mh45 ...
- matlab主导极点怎么求,Matlab - 以编程方式查找主导极点
如果您已经获得了传递函数,您可以做的是分析极点并根据它们的实际值进行排序.稳定的极点或复极点(即在复平面的左侧)和最接近虚轴的极点或极点将是您选择的最主要的极点. 考虑到您的传递函数存储在TF对象中, ...
最新文章
- 【转贴】Decoda Tutorial LUA调式器
- 10692 XYM-入门之道
- 使用 Python 和 Flask 实现 RESTful services
- easyUI datagrid 重复发送URL请求
- MongoDB-Getting Started with the C# Driver
- matlab中的高阶导数,MATLAB如何求函数的n阶导数?
- Cesium加载影像图
- Jquery如何去掉复选框的勾
- 生日快乐网页模板(HTML5+CSS3+JS)
- RSA加密算法(32bit比特级运算)(复杂版)(C++实现)
- WebBowser 实现淘宝网自动登录
- JAVA毕设项目猎头公司业务管理系统的设计与实现(java+VUE+Mybatis+Maven+Mysql)
- LInux:进程等待之wait() waitpid()
- linux服务器用lighttpd+mysql5+php5+SupeSite/X-Space+discuz构建社区门户
- java和区块链哪个难_java 区块链中设计合理的难度系数
- C语言中getch()、getche()和getchar()
- 谢孟军:中国 Go 语言领军人创业第五年
- joycon手柄拆解_爱活电刑室 | 撬开海拉尔的大门! 任天堂Switch全拆解
- gitlab打tag标签
- 服务器的cd驱动器怎么修改盘符,windows 2016 修改驱动器盘符
热门文章
- 如何把计算机颜色调正常,怎样调电脑屏幕亮度和颜色,电脑屏幕颜色调回正常...
- 【数据库系统原理】第一节数据库系统概述
- vb.net 教程 3-9 窗体编程 串口组件2 SerialPort简介
- 【转】使用bt4(Backtrack)破解无线路由(无线网络/无线AP)密码/wep加密/Aircrack-ng
- ZYNQ学习之路(三):自定义IP实现PL处理PS写入BRAM的数据
- 【微信小程序云开发】利用excel导入到云数据库时乱码
- linux查看进程占用网速和流量使用情况
- 30城市地震风险排行上海最低
- 我国土壤分布现状及应对措施
- labview下载地址