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

  • 相关阅读:
    nginx 负载均衡
    nginX 安装 启动
    nginx 简介
    使用ASDM 管理 ciscoASA设备
    OSPF配置实验(一)
    VRRP
    HSRP 详解
    Rip 动态路由协议
    配置ASA防火墙 远程管理方式
    Oracle 重启监听
  • 原文地址:https://www.cnblogs.com/funnyman/p/4377936.html
Copyright © 2011-2022 走看看