plot.bas

来自「A implementation of the discrete Fourier」· BAS 代码 · 共 24 行

BAS
24
字号
Attribute VB_Name = "plot"

Public Sub plotip()
On Error Resume Next
Dim maxvalue, oldval As Double

mainfrm.ipplot.Line (0, 1450 / Screen.TwipsPerPixelY)-(10000, 1450 / Screen.TwipsPerPixelY), vbRed

For cnt = 0 To 512
    If (maxvalue < FuncGen.Samples(cnt)) Then
        maxvalue = FuncGen.Samples(cnt)
    End If
Next cnt

oldval = 2900 / (2 * Screen.TwipsPerPixelY)
For cnt = 1 To 512
    mainfrm.ipplot.Line (cnt - 1, oldval)-(cnt, (2900 / (2 * Screen.TwipsPerPixelY)) - (FuncGen.Samples(cnt) * ((950 / Screen.TwipsPerPixelY) / maxvalue)))
    oldval = (2900 / (2 * Screen.TwipsPerPixelY)) - (FuncGen.Samples(cnt) * ((950 / Screen.TwipsPerPixelY) / maxvalue))
Next cnt



End Sub

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?