nlqrrootmainmodule.bas
来自「工程数值分析中的一些常用工具,相信对大家很有用的」· BAS 代码 · 共 21 行
BAS
21 行
Attribute VB_Name = "MainModule"
Sub Main()
Dim x As Double
' 迭代初值
x = 1
'求解
If NLPqRoot(x, 0.000001) Then
MsgBox "x = " & x
Else
MsgBox "求解失败"
End If
End Sub
' 待求解的方程的函数
Function Func(x As Double) As Double
Func = x * x * x - x * x - 1
End Function
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?