zoukankan      html  css  js  c++  java
  • matlab_randn函数

    randn 
    Normally distributed random numbers and arrays Syntax Y = randn(n) Y = randn(m,n) Y = randn([m n]) Y = randn(m,n,p,...) Y = randn([m n p...]) Y = randn(size(A)) randn 
    s = randn('state') Description 
    The randn function generates arrays of random numbers whose elements are normally distributed with mean 0, variance σ^2 = 1 , and standard deviation σ = 1. 
    Y = randn(n) returns an n-by-n matrix of random entries. An error message appears if n is not a scalar. 

    Y = randn(m,n) or Y = randn([m n]) returns an m-by-n matrix of random entries. 

    Y = randn(m,n,p,...) or Y = randn([m n p...]) generates random arrays. 

    Y = randn(size(A)) returns an array of random entries that is the same size as A. 

    randn, by itself, returns a scalar whose value changes each time it's referenced. 

    s = randn('state') returns a 2-element vector containing the current state of the normal generator. To change the state of the generator: randn('state',s)Resets the state to s. randn('state',0)Resets the generator to its initial state. randn('state',j)For integer j, resets the generator to its jth state. randn('state',sum(100*clock))Resets it to a different state each time.

    s = randn('state')返回一个2元素的包含了当前正常generator的行向量,要改变这个gennrator: randn('state',s)重置状态到s,randn('state',0)重置状态到最开始状态,randn('state',j),对于整数j重置到第j个状态,randn('state',sum(100*clock))每次都重置到不同状态.

  • 相关阅读:
    4-vim-工作模式-01-职责以及切换模式
    3-vim-打开和新建文件-02-删除交换文件
    poj1011Stick(dfs+剪枝)
    POJ 1251 Jungle Roads (prim)
    poj 2502 Subway
    poj 3624 Charm Bracelet (01背包)
    拦截导弹问题(动态规划)
    Policy Gradient
    深入了解马尔科夫决策过程(Markov Decision Process)
    深度学习中调参对模型容量的影响
  • 原文地址:https://www.cnblogs.com/funnyman/p/4377936.html
Copyright © 2011-2022 走看看