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

源代码在线查看: d12r4.txt

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

相关代码

				Private Sub Command1_Click()
				    'PROGRAM D12R4
				    'Driver for routine SINFT
				    EPS = 0.001
				    NP = 16
				    NPP2 = NP + 2
				    Width1 = 30#
				    PI = 3.14159
				    Dim DATA(16), SIZE1(16)
				    N = NP / 2
				    Print
				    Print Tab(5); "Period of sinusoid in channels (2-";
				    Print Format$(NP, "##"); "; or 0 to stop)"
				    PER = 16
				    If PER 				    For I = 1 To NP
				        DATA(I) = Sin(2# * PI * (I - 1) / PER)
				    Next I
				    Call SINFT(DATA(), NP)
				    BIG = -10000000000#
				    SMALL = 10000000000#
				    For I = 1 To NP
				        If DATA(I) < SMALL Then SMALL = DATA(I)
				        If DATA(I) > BIG Then BIG = DATA(I)
				    Next I
				    SCAL1 = Width1 / (BIG - SMALL)
				    For I = 1 To NP
				        NLIM = Int(SCAL1 * (DATA(I) - SMALL) + EPS)
				        Print Tab(5); Format$(I, "##");
				        For J = 1 To NLIM + 1
				            Print "*";
				        Next J
				    Next I
				    Call SINFT(DATA(), NP)
				    BIG = -10000000000#
				    SMALL = 10000000000#
				    For I = 1 To NP
				        If DATA(I) < SMALL Then SMALL = DATA(I)
				        If DATA(I) > BIG Then BIG = DATA(I)
				    Next I
				    SCAL1 = Width1 / (BIG - SMALL)
				    For I = 1 To NP
				        NLIM = Int(SCAL1 * (DATA(I) - SMALL) + EPS)
				        Print Tab(5); Format$(I, "##");
				        For J = 1 To NLIM + 1
				            Print "*";
				        Next J
				    Next I
				End Sub			

相关资源