%%新函数  2*randi([0,1],2,1)-1   等价于老函数     2*randint(2,1)-1

函数形式:randi([imin,imax],m,n)

参数解释:

[imin,imax]表示生成的伪随机数为闭区间[imin,imax]上的所有整数

m,n表示生成伪随机矩阵是m*n维


原文:https://blog.csdn.net/galaxy9064/article/details/40622897

相关文章:

  • 2022-12-23
  • 2021-12-23
  • 2022-01-25
  • 2021-09-12
  • 2021-11-19
  • 2021-05-26
  • 2021-12-28
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-13
  • 2021-09-03
  • 2021-11-04
  • 2021-12-06
相关资源
相似解决方案