📄 main.frm
字号:
Name = "Courier New"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 315
Left = 765
TabIndex = 20
Top = 1410
Visible = 0 'False
Width = 1680
End
End
Begin VB.Frame Frame1
Caption = "Input"
BeginProperty Font
Name = "Courier New"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 3195
Left = 120
TabIndex = 0
Top = 120
Width = 11595
Begin MSComctlLib.Slider Slideramp
Height = 210
Left = 45
TabIndex = 13
Top = 2460
Width = 3645
_ExtentX = 6429
_ExtentY = 370
_Version = 393216
Min = 1
End
Begin VB.CommandButton btn_generate
Caption = "Generate"
Height = 315
Left = 1845
TabIndex = 12
Top = 2760
Width = 1770
End
Begin VB.CommandButton btn_clr
Caption = "Clear"
Height = 315
Left = 120
TabIndex = 11
Top = 2760
Width = 1650
End
Begin VB.PictureBox ipplot
Appearance = 0 'Flat
BackColor = &H00000000&
ForeColor = &H0080FF80&
Height = 2900
Left = 3750
ScaleHeight = 191
ScaleMode = 3 'Pixel
ScaleWidth = 514
TabIndex = 10
Top = 210
Width = 7740
End
Begin VB.Frame Frame3
Caption = "Parameters"
BeginProperty Font
Name = "Courier New"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 2070
Left = 1845
TabIndex = 5
Top = 315
Width = 1770
Begin VB.TextBox txt_impulsepos
Enabled = 0 'False
Height = 285
Left = 90
TabIndex = 16
Text = "10"
Top = 1665
Width = 870
End
Begin VB.TextBox txtfreq
Height = 300
Left = 90
TabIndex = 9
Text = "10"
Top = 1020
Width = 765
End
Begin VB.TextBox txtsamp
Height = 300
Left = 105
TabIndex = 8
Text = "1000"
Top = 510
Width = 765
End
Begin VB.Label Label3
Caption = "Position"
BeginProperty Font
Name = "Courier New"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 285
Left = 60
TabIndex = 17
Top = 1365
Width = 1575
End
Begin VB.Label Label2
Caption = "Frequency(Hz)"
BeginProperty Font
Name = "Courier New"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 285
Left = 90
TabIndex = 7
Top = 795
Width = 1575
End
Begin VB.Label Label1
Caption = "Sampling Rate"
BeginProperty Font
Name = "Courier New"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 75
TabIndex = 6
Top = 270
Width = 1635
End
End
Begin VB.Frame Frame2
Caption = "Wave"
BeginProperty Font
Name = "Courier New"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 2070
Left = 120
TabIndex = 1
Top = 315
Width = 1665
Begin VB.OptionButton opt_impulse
Caption = "Impulse"
BeginProperty Font
Name = "Courier New"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 61
TabIndex = 15
Top = 1740
Width = 1230
End
Begin VB.OptionButton Opt_sqr
Caption = "Square"
BeginProperty Font
Name = "Courier New"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 270
Left = 61
TabIndex = 4
Top = 1260
Width = 1170
End
Begin VB.OptionButton opt_cos
Caption = "Cos"
BeginProperty Font
Name = "Courier New"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 61
TabIndex = 3
Top = 810
Width = 1080
End
Begin VB.OptionButton opt_sin
Caption = "Sin"
BeginProperty Font
Name = "Courier New"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 300
Left = 61
TabIndex = 2
Top = 300
Value = -1 'True
Width = 1110
End
End
End
End
Attribute VB_Name = "mainfrm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim REX(512) 'REX[ ] holds the real part of the frequency domain
Dim IMX(512) 'IMX[ ] holds the imaginary part of the frequency domain
Const N = 512
Public Sub fft()
pi = 3.14159265 'Set constants
1000 'THE FAST FOURIER TRANSFORM
'copyright
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -