首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VB >

考研用急求混沌方程图型解决办法

2012-03-31 
考研用急求混沌方程图型混沌方程:ydxdyp1*x-x^3-p*y+q*Cos(wt)求高手帮忙用vb画出以(x,y)为坐标的图象,

考研用急求混沌方程图型
混沌方程:
y   =   dx
dy   =   p1   *   x   -   x   ^   3   -   p   *   y   +   q   *   Cos(wt)

求高手帮忙用vb画出以(x,y)为坐标的图象,在线等
图象在   http://hi.baidu.com/ghdwff/blog/item/391e762da4c76836359bf753.html

[解决办法]
Option Explicit

Private Function f(x As Single, y As Single) As Boolean
'检查 x、y 是否满足函数
End Function

Private Sub Form_Load()
Me.ScaleMode = vbPixels
Me.WindowState = vbMaximized
Me.AutoRedraw = True

Dim i As Long
Dim j As Long
Dim x As Single
Dim y As Single
Dim d
Me.Cls

For i = -300 To 300
x = i / 100
For j = -300 To 300
y = j / 100

If f(x, y) Then
PSet (i, j), 0
End If
Next
Next
End Sub


[解决办法]

C/C++ code
Option   Explicit Private   Function   f(x   As   Single,   y   As   Single)   As   Boolean         '检查   x、y   是否满足函数 End   Function Private   Sub   Form_Load()         Me.ScaleMode   =   vbPixels         Me.WindowState   =   vbMaximized         Me.AutoRedraw   =   True                 Dim   i   As   Long         Dim   j   As   Long         Dim   x   As   Single         Dim   y   As   Single         Dim   d         Me.Cls                 For   i   =   -300   To   300                 x   =   i   /   100                 For   j   =   -300   To   300                         y   =   j   /   100                                                 If   f(x,   y)   Then                                 PSet   (i,   j),   0                         End   If                 Next         Next End   Sub 

热点排行