?? form1.frm
字號:
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 6090
ClientLeft = 60
ClientTop = 420
ClientWidth = 8730
LinkTopic = "Form1"
ScaleHeight = 6090
ScaleWidth = 8730
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command1
Caption = "Command1"
Height = 855
Left = 1920
TabIndex = 0
Top = 2880
Width = 1815
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim Perm_Ave As Double '平均滲透率
Const Ni = 31, Nj = 31, Nk = 7
Perm_Ave = 4114
Dim i As Integer, j As Integer, k As Integer
Dim perm() As Double
ReDim perm(1 To Ni * Nj, 1 To Nk)
For k = 1 To Nk
Open App.Path & "\" & k & "-perm.txt" For Input As #1
For i = 1 To Ni * Nj
Input #1, perm(i, k)
Next i
Close #1
Next k
Dim ll As Integer
ll = 0
Open App.Path & "\out壓縮30%-Perm.txt" For Output As #1
Open App.Path & "\out壓縮60%-Perm.txt" For Output As #2
Open App.Path & "\out拉大30%-Perm.txt" For Output As #3
Open App.Path & "\out拉大68%-Perm.txt" For Output As #4
For k = 1 To Nk
For i = 1 To Ni * Nj
'--壓縮30%
If perm(i, k) > Perm_Ave Then
Print #1, perm(i, k) - Abs((Perm_Ave - perm(i, k))) * 0.3; Space(2);
ElseIf perm(i, k) < Perm_Ave Then
Print #1, perm(i, k) + Abs((Perm_Ave - perm(i, k))) * 0.3; Space(2);
Else
Print #1, perm(i, k); Space(2);
End If
'--壓縮60%
If perm(i, k) > Perm_Ave Then
Print #2, perm(i, k) - Abs((Perm_Ave - perm(i, k))) * 0.6; Space(2);
ElseIf perm(i, k) < Perm_Ave Then
Print #2, perm(i, k) + Abs((Perm_Ave - perm(i, k))) * 0.6; Space(2);
Else
Print #2, perm(i, k); Space(2);
End If
'--拉大30%
If perm(i, k) > Perm_Ave Then
Print #3, perm(i, k) + Abs((Perm_Ave - perm(i, k))) * 0.3; Space(2);
ElseIf perm(i, k) < Perm_Ave Then
If (perm(i, k) - (Abs(Perm_Ave - perm(i, k))) * 0.3) <= 0 Then
Print #3, "0.1"; Space(2);
Else
Print #3, perm(i, k) - Abs((Perm_Ave - perm(i, k))) * 0.3; Space(2);
End If
Else
Print #3, perm(i, k); Space(2);
End If
'--拉大68%
If perm(i, k) > Perm_Ave Then
Print #4, perm(i, k) + Abs((Perm_Ave - perm(i, k))) * 0.68; Space(2);
ElseIf perm(i, k) < Perm_Ave Then
If (perm(i, k) - Abs((Perm_Ave - perm(i, k))) * 0.68) <= 0 Then
Print #4, "0.1"; Space(2);
Else
Print #4, perm(i, k) - Abs((Perm_Ave - perm(i, k))) * 0.68; Space(2);
End If
Else
Print #4, perm(i, k); Space(2);
End If
ll = ll + 1
If ll Mod 4 = 0 Then Print #1,: Print #2,: Print #3,: Print #4,
Next i
Next k
Close #1, #2, #3, #4
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -