标题:VB编程问题
只看楼主
w0407010322
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2008-5-13
 问题点数:0 回复次数:0 
VB编程问题
我毕业设计要用CST软件设计仿真一个天线,在建模的时候遇到一个问题,要对一个曲面建构进行建模,这个曲面遵循一个指数函数y=e 0.0279z (其中0.0279z是指数),该软件建模曲面要用vb编程,它可直接生成一个自定义曲线,然后改写它的程序,就可以生成自己想要的曲线,下面是它的原程序,请问该怎么编程才能生成我想要的y=e 0.0279z (其中0.0279z是指数)?
On Error GoTo Curve_Exists
    Curve.NewCurve "2D-Analytical"
Curve_Exists:
On Error GoTo 0

Dim sCurveName As String

sCurveName = "spline_1"

With Spline
  .Reset
  .Name sCurveName
  .Curve "2D-Analytical"
' ======================================
' !!! Do not change ABOVE this line !!!
' ======================================
' -----------------------------------------------------------
' adjust x-range as for-loop parameters (xmin,max,stepsize)
' enter y-Function-statement within for-loop
' fixed parameters a,b,c have to be declared via Dim-Statement
' -----------------------------------------------------------
' NOTE: available MWS-Parameters can be used without
'       declaration at any place (loop-dimensions, ...)
'       (for parametric curves during parameter-sweeps and optimisation !)
' -------------------------------------------
  Dim xxx As Double, yyy As Double
  
  Dim aaa As Double  ' not necessary if aaa is model parameter
  aaa = 1.23456/Atn(0.5)

  For xxx = 1.5  To  10  STEP  0.5

    yyy = 3*aaa/xxx + Sin(xxx^2)
        
    .LineTo xxx , yyy
  Next xxx
' ======================================
' !!! Do not change BELOW this line !!!
' ======================================
  .Create
End With

SelectTreeItem("Curves\2D-Analytical\"+sCurveName)
搜索更多相关主题的帖子: Curve GoTo 曲面 建模 曲线 
2008-05-13 17:39



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-214112-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.472233 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved