1.  您現在的位置:  
       首 頁 > CST > CST百科問答 > 怎樣在cst中自定義個脈沖

      怎樣在cst中自定義個脈沖

      文章來源: 互聯網    錄入: mweda.com   

      ' userdefined excitation function

      Option Explicit

      Function ExcitationFunction(dtime As Double) As Double
         'Assign the excitation signal value for the given time to the function name.
      Static bFirst As Boolean
      bFirst=True
      Static timeval() As Double
      Static Valval() As Double
      Static Nt As Integer
      Dim i As Integer
      Dim TT As String,a As String

      If dtime=0 Then
        bFirst=False
        'read file data
        Open "E:\User\time.txt" For Input As 1                    %  時間參數
        Open "E:\User\amp.txt" For Input As 2                    %  幅度參數
        Input #1,TT
        Nt=CInt(TT)
        ReDim timeval(1 To Nt)
        ReDim Valval(1 To Nt)
        i=1
                For i=1 To Nt
           Input #1,TT
           timeval(i)=CDbl(TT)
                  Input #2,a
           Valval(i)=CDbl(a)
                Next
              Close #1
              Close #2
      End If
      For i=1 To Nt
         If Abs(dtime-timeval(i)*1e+9)<0.05 Then
                   ExcitationFunction=Valval(i)
                   Exit For
                End If
              Next

      End Function
      ' -------------------------------------------------------------------------------------------------
      ' Main: This function serves as a main program for testing purposes. (runs and plots the function)
      '       You need to rename this function to "Main" for debugging the excitation function.
      '
      '       Please adjust the time step width and the number of time steps accordingly.
      '
      '  PLEASE NOTE that a userdefined excitation file (*.usf) must not contain a main program for
      '       proper execution by the framework. Therefore please ensure to rename this function
      '       to e.g. "Main2" before the Transient Solver is started
      ' -------------------------------------------------------------------------------------------------
      Sub Main
      Dim tmax As Double, ntstep As Long
      ' -------------- PLEASE ADJUST THE SETTINGS BELOW ----------------------
      tmax   = 50.0
      ntstep = 502
      ' -------------- PLEASE ADJUST THE SETTINGS ABOVE ----------------------
      Dim signal As Object, n As Long, tstep As Double
      Set signal = Result1D("")
      signal.Initialize ntstep
      tstep = tmax / ntstep
      For n=0 To ntstep-1
        signal.SetXY(n, n * tstep, ExcitationFunction(n * tstep))
      Next n
      signal.Save GetProjectBaseName() + GetProjectBaseNameSeparator() + "excitation function.sig"
      signal.AddToTree "Excitation Signals\Userdefined Functions\signal1_plot"
      SelectTreeItem  "Excitation Signals\Userdefined Functions\signal1_plot"
      ResultTree.RefreshView
      End Sub

      但是就是運行不起。 哪位  幫我看看這個程序,

      微波EDA (www.tanchuguo.com) 網友回復:

      • 網友回復

        不太清楚這些
      • 網友回復

      • 網友回復

        好復雜,從來沒有自定義過激勵函數。

      申明:網友回復良莠不齊,僅供參考。如需專業解答,推薦學習李明洋老師的CST培訓視頻,或咨詢本站專家

      • CST微波工作室教學培訓視頻教程

        CST中文視頻教程,資深專家講解,視頻操作演示,從基礎講起,循序漸進,并結合最新工程案例,幫您快速學習掌握CST的設計應用...【詳細介紹

      推薦課程

      射頻工程師學習培訓教程

      日本护士xxxx黑人巨大| 日韩乱码人妻无码中文字幕久久 | 极品少妇伦理一区二区| 亚洲国产精品成人精品小说| 男女后进式猛烈XX00动态图片| 四虎影视永久地址www成人| 精品国产a∨无码一区二区三区| 国产成人一级片| 521色香蕉网站在线观看| 国产精品99久久久久久www| 黄在线观看www免费看| 国产成人亚洲精品无码青青草原| 英国性经典xxxx| 国产一区第一页| 色悠久久久久久久综合网伊人 | 精品无码久久久久久久久| 国产又粗又长又硬免费视频 | 中文字幕精品一区| 我要看三级全黄| 中文字幕三级在线不卡| 我要看WWW免费看插插视频| 中文字幕在线网站| 成人免费看黄20分钟| 久久久亚洲欧洲日产国码aⅴ | 一区二区三区影院| 性欧美大战久久久久久久野外| 一级性生活免费| 国产超碰人人爽人人做| canopen永久| 在线天堂资源www在线中文| аⅴ资源中文在线天堂| 国产超碰人人爽人人做人人添 | 成年女人毛片免费视频| 久久午夜无码鲁丝片直播午夜精品| 成人免费在线视频| youjizcom亚洲| 国产精品婷婷久青青原| 视频一区中文字幕| 啊~用力cao我cao烂我小婷| 精品久久久久久无码中文字幕| 免费a级毛片永久免费|