matlab中的rand('state',sum(clock));这一句是什么意思?请指点!
展开全部
matlab文档说明:
In versions of MATLAB prior to 7.7 (R2008b), you controlled the internal state of the random number stream used by rand by calling rand directly with the 'seed', 'state', or 'twister' keywords. That syntax is still supported for backwards compatibility, but is not recommended. To update your code, see Updating Your Random Number Generator Syntax in the MATLAB Mathematics documentation.
意思是初始化随机数产生序列的办法,该方法已经从7.7开始过时了,但是仍然兼容。 具体可以参考http://www.mathworks.com/help/techdoc/math/bsn94u0-1.html
另外clock产生[year month day hour minute seconds]的数值,所以该语句表示用当前时间初始化随机数序列。
In versions of MATLAB prior to 7.7 (R2008b), you controlled the internal state of the random number stream used by rand by calling rand directly with the 'seed', 'state', or 'twister' keywords. That syntax is still supported for backwards compatibility, but is not recommended. To update your code, see Updating Your Random Number Generator Syntax in the MATLAB Mathematics documentation.
意思是初始化随机数产生序列的办法,该方法已经从7.7开始过时了,但是仍然兼容。 具体可以参考http://www.mathworks.com/help/techdoc/math/bsn94u0-1.html
另外clock产生[year month day hour minute seconds]的数值,所以该语句表示用当前时间初始化随机数序列。
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询