一些常被用于教学或者参考的概率论的实例的源代码

源代码在线查看: cc.m

软件大小: 30 K
上传用户: chmqn
关键词: 概率论 源代码
下载地址: 免注册下载 普通下载 VIP

相关代码

				%cc.m/created by PJNahin for "Duelling Idiots"(3/31/99)
				%This program generates a random vector, X, of length
				%20,009 and then calculates the correlation coefficient
				%X(n) and X(n+j) for j = 0,1,2,...,9.
				%
				%
				rand('state',100*sum(clock))
				for i=1:20010
				   X(i)=rand;
				end
				for j=0:9
				   summation=0;
				   for i=1:20000
				      summation=summation+X(i)*X(i+j);
				   end
				   coefficient=(12*summation/20000)-3
				end
				
				
				
							

相关资源