• 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))每次都重置到不同状态.

  • 相关阅读:
    企业站前端——总结
    visual studio插件 visual assistx
    github 预览html
    Resharper
    c#解析json
    Visual Studio 2015 RC Downloads
    C#位运算讲解与示例
    java 位运算权限管控(转载)
    双机热备
    c# 代码执行时间
  • 原文地址:https://www.cnblogs.com/funnyman/p/4377936.html
Copyright © 2020-2023  润新知