matlab functions调用,我常用的Matlab functions

在这里搜集我常用的Matlab functions. 大部分的说明在Matlab 官网都有。这里整理摘抄我最常用的一些function feature,以便之后调用:

A. generate uniform random variable:

如果有 Statistics and Machine Learning Toolbox, 可以用 unifrnd 来产生 continuous uniform random variable, 用 unidrnd 来产生 discrete uniform random variable. 以下是它们的常用用法:(因为看英文网站,节约翻译时间,就直接用英文了)

https://www.mathworks.com/help/stats/unifrnd.html

r=unifrnd(a,b)

It generates r as a uniform random variable in the range [

a

,

b

]

[a,b][a,b].

r=unifrnd(a,b,sz1,…,szN)

It generates a N-dimensional uniform random vector. Each dimension is a uniform random variable in the range of [

a

,

b

]

[a,b][a,b]. Theoretically, N

NN can be any finite positive integer.

https://www.mathworks.com/help/stats/unidrnd.html

r=unidrnd(n): n

nn specifies the largest possible value of r

rr. n

nn can be a scalar, vector or matrix. It then generate a scalar, vector or matrix correspondingly.

r=unidrnd(n,sz1,…,szN): the same as 2.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值