VB常用数值算法集 内含有解线性代数方程组

源代码在线查看: moment.txt

软件大小: 1879 K
上传用户: whyzhao
关键词: 数值算法 解线性 方程
下载地址: 免注册下载 普通下载 VIP

相关代码

				Sub MOMENT(DATA(), N, AVE, ADEV, SDEV, VAR, SKEW, CURT)
				    If N 				        Print " 'N must be at least 2'"
				      Exit Sub
				    End If
				    S = 0#
				    For J = 1 To N
				        S = S + DATA(J)
				    Next J
				    AVE = S / N
				    ADEV = 0#
				    VAR = 0#
				    SKEW = 0#
				    CURT = 0#
				    For J = 1 To N
				        S = DATA(J) - AVE
				        ADEV = ADEV + Abs(S)
				        P = S * S
				        VAR = VAR + P
				        P = P * S
				        SKEW = SKEW + P
				        P = P * S
				        CURT = CURT + P
				    Next J
				    ADEV = ADEV / N
				    VAR = VAR / (N - 1)
				    SDEV = Sqr(VAR)
				    If VAR  0# Then
				        SKEW = SKEW / (N * SDEV ^ 3)
				        CURT = CURT / (N * VAR ^ 2) - 3#
				    Else
				        Print " no skew or kurtosis when zero variance"
				    End If
				End Sub			

相关资源