⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form1.frm

📁 vb 调用matlab方法实例
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1
   ClientHeight    =   3195
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   PaletteMode     =   1  'UseZOrder
   ScaleHeight     =   3195
   ScaleWidth      =   4680
   StartUpPosition =   3  'Windows Default
   Begin VB.CommandButton Command1
      Caption         =   "Draw fractal"
      Height          =   615
      Left            =   1560
      TabIndex        =   0
      Top             =   1200
      Width           =   1335
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim ax As Variant
Private Sub Command1_Click()
  Command1.Visible = False

  titl = "MatrixVB fractal demo"
  N = 14
  m = 300
  cx = 0.025
  cy = 0
  l = 0.03
  x = linspace(cx - l, cx + l, m)
  y = linspace(cy - l, cy + l, m)
  XY = meshgrid(x, y)
  x = XY(1)
  y = XY(2)
  Z = plus(zeros(m), 2.22E-16)
  C = mcomplex(x, y)
  For k = 1 To N
    Form1.Caption = titl & " (calculating " & k & "/" & N & ")"
    DoEvents
    Z = plus(power(Z, Z), C)
  Next
  Form1.Caption = titl

  W = mexp(uminus(mabs(Z)))
  pcolor (W)
  colormap (jet)
  axis ("off")
End Sub
Private Sub Form_Load()
  ax = vbaxes(Form1.hWnd)
  Call Form_Resize
End Sub
Private Sub Form_Resize()
  vbrefresh ax
End Sub

⌨️ 快捷键说明

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