📄 提取数据.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 3090
ClientLeft = 60
ClientTop = 450
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3090
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text1
Height = 615
Left = 1080
TabIndex = 1
Text = "Text1"
Top = 480
Width = 2055
End
Begin VB.CommandButton Command1
Caption = "Command1"
Height = 495
Left = 1800
TabIndex = 0
Top = 1920
Width = 1215
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Sub Command1_Click()
Dim row_XReal(0, 0) As Double
Dim row_XImag(0, 0) As Double
Dim column_XReal(0, 0) As Double
Dim column_XImag(0, 0) As Double
Dim c_XReal(0, 0) As Double
Dim c_XImag(0, 0) As Double
Dim af_XReal(0, 0) As Double
Dim af_XImag(0, 0) As Double
Dim para_XReal(0, 0) As Double
Dim para_XImag(0, 0) As Double
Dim sink() As Double
Set Matlab = CreateObject("Matlab.Application")
Matlab.Execute ("load('D:\vb work\256doe.mat') ")
result = Matlab.Execute("y=C;")
result = Matlab.Execute("[row,column]=size(y);")
result = Matlab.GetFullMatrix("row", "base", row_XReal, row_XImag)
result = Matlab.GetFullMatrix("column", "base", column_XReal, column_XImag)
ReDim sink(1 To column_XReal(0, 0)) As Double
Set xml_document = New DOMDocument
For j = 1 To column_XReal(0, 0)
xml_document.Load ("D:\vb work\256DOE" & "\" & j & ".xml")
intLnth = xml_document.getElementsByTagName("DeptValues").length
Set node_list = xml_document.getElementsByTagName("DeptValues")
Min = 100
Max = 0
For i = 0 To intLnth - 1
Set x = xml_document.getElementsByTagName("DeptValues")(i).childNodes(0)
If CDbl(x.substringData(32, 12)) < Min Then
Min = CDbl(x.substringData(32, 12))
End If
If CDbl(x.substringData(32, 12)) > Max Then
Max = CDbl(x.substringData(32, 12))
End If
Next i
If Min > 0 Then
sink(j) = Max * 10 ^ 3
Else
sink(j) = (Max - Min) * 10 ^ 3
End If
Next j
'-----Save Object Data in Matlab
result = Matlab.MaximizeCommandWindow
result = Matlab.Execute("temp=[];")
For j = 1 To column_XReal(0, 0)
para_XReal(0, 0) = sink(j)
para_XImag(0, 0) = 0
result = Matlab.PutFullMatrix("af", "base", para_XReal, para_XImag)
result = Matlab.Execute("temp=[temp af];")
Next j
result = Matlab.Execute("Y =temp';")
result = Matlab.Execute("save 'D:\vb work\256doe.mat' Y -append;")
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -