作业帮 > 综合 > 作业

问一下这个matlab语句的意思

来源:学生作业帮 编辑:拍题作业网作业帮 分类:综合作业 时间:2024/05/29 08:07:23
问一下这个matlab语句的意思
randn('seed',14);
这个matlab语句是放在程序最前面定义某些东西
紧跟之后的语句为w=sqrt(Q)*randn(1,Bushu);其中Q和Bushu都已知
andn
Normally distributed pseudorandom numbers
Syntax
r = randn(n)
randn(m,n)
randn([m,n])
randn(m,n,p,...)
randn([m,n,p,...])
randn(size(A))
r = randn(..., 'double')
r = randn(..., 'single')
Description
r = randn(n) returns an n-by-n matrix containing pseudorandom values drawn from the standard normal distribution. randn(m,n) or randn([m,n]) returns an m-by-n matrix. randn(m,n,p,...) or randn([m,n,p,...]) returns an m-by-n-by-p-by-... array. randn returns a scalar. randn(size(A)) returns an array the same size as A.
r = randn(..., 'double') or r = randn(..., 'single') returns an array of normal values of the specified class
randn-产生一个正态分布的随机数(整数)组
它的参数应当是数组维数以及数组元素的类型(double or single)
你所写的语句中'seed'的意义不清楚
w=sqrt(Q)*randn(1,Bushu);表明Q的平方根与一个随机数相乘
希望能帮到你.