日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 人工智能 > 循环神经网络 >内容正文

循环神经网络

matlab randn 范围,请问randn产生的数据在什么范围内变化

發布時間:2023/12/4 循环神经网络 30 豆豆
生活随笔 收集整理的這篇文章主要介紹了 matlab randn 范围,请问randn产生的数据在什么范围内变化 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

產生均值為0,方差 σ^2 = 1,標準差σ = 1的正態分布的隨機數或矩陣的函數。

Example:產生一個隨機分布的指定均值和方差的矩陣:將randn產生的結果乘以標準差,然后加上期望均值即可。例如,產生均值為0.6,方差為0.1的一個5*5的隨機數方式如下:

x = .6 + sqrt(0.1) * randn(5)

x =

0.8713? ? 0.4735? ? 0.8114? ? 0.0927? ? 0.7672

0.9966? ? 0.8182? ? 0.9766? ? 0.6814? ? 0.6694

0.0960? ? 0.8579? ? 0.2197? ? 0.2659? ? 0.3085

0.1443? ? 0.8251? ? 0.5937? ? 1.0475? ?-0.0864

0.7806? ? 1.0080? ? 0.5504? ? 0.3454? ? 0.5813

其他類似函數:rand, randperm, sprand, sprandn

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.ExamplesExample 1. R = randn(3,4) may produce??R =

1.1650? ? 0.3516? ? 0.0591? ? 0.8717

0.6268? ?-0.6965? ? 1.7971? ?-1.4462

0.0751? ? 1.6961? ? 0.2641? ?-0.7012

For a histogram of the randn distribution, see hist. Example 2. Generate a random distribution with a specific mean and variance . To do this, multiply the output of randn by the standard deviation , and then add the desired mean. For example, to generate a 5-by-5 array of random numbers with a mean of .6 that are distributed with a variance of 0.1 x = .6 + sqrt(0.1) * randn(5)

x =

0.8713? ? 0.4735? ? 0.8114? ? 0.0927? ? 0.7672

0.9966? ? 0.8182? ? 0.9766? ? 0.6814? ? 0.6694

0.0960? ? 0.8579? ? 0.2197? ? 0.2659? ? 0.3085

0.1443? ? 0.8251? ? 0.5937? ? 1.0475? ?-0.0864

0.7806? ? 1.0080? ? 0.5504? ? 0.3454? ? 0.5813

See Also rand, randperm, sprand, sprandn

[本帖最后由 treeman 于 2010-10-14 22:22 編輯]

創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎

總結

以上是生活随笔為你收集整理的matlab randn 范围,请问randn产生的数据在什么范围内变化的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。