您現(xiàn)在的位置:  
 首 頁 > CST > CST百科問答 > 怎樣在cst中自定義個(gè)脈沖

怎樣在cst中自定義個(gè)脈沖

文章來源: 互聯(lián)網(wǎng)    錄入: 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                    %  時(shí)間參數(shù)
  Open "E:\User\amp.txt" For Input As 2                    %  幅度參數(shù)
  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

但是就是運(yùn)行不起。 哪位  幫我看看這個(gè)程序,

微波EDA (m.ostronger.com) 網(wǎng)友回復(fù):

  • 網(wǎng)友回復(fù)

    不太清楚這些
  • 網(wǎng)友回復(fù)

  • 網(wǎng)友回復(fù)

    好復(fù)雜,從來沒有自定義過激勵函數(shù)。

申明:網(wǎng)友回復(fù)良莠不齊,僅供參考。如需專業(yè)解答,推薦學(xué)習(xí)李明洋老師的CST培訓(xùn)視頻,或咨詢本站專家

  • CST微波工作室教學(xué)培訓(xùn)視頻教程

    CST中文視頻教程,資深專家講解,視頻操作演示,從基礎(chǔ)講起,循序漸進(jìn),并結(jié)合最新工程案例,幫您快速學(xué)習(xí)掌握CST的設(shè)計(jì)應(yīng)用...【詳細(xì)介紹

推薦課程

射頻工程師學(xué)習(xí)培訓(xùn)教程

主站蜘蛛池模板: 亚洲综合视频在线观看| 日韩网新片免费| 国产精品一区二区久久不卡| 久久国产一区二区三区| 欧美福利视频网| 国产久热精品无码激情| 亚洲五月激情网| 性猛交xxxxx按摩中国| 亚洲国产成人精品久久| 田中瞳中文字幕久久精品| 四虎在线永久精品高清| 99久久精品免费观看国产| 成人午夜小视频| 亚洲国产欧美在线观看| 色情无码www视频无码区小黄鸭| 国内亚州视频在线观看| 久久免费观看国产精品| 欧美a级在线观看| 亚洲欧美中文日韩在线| 特级淫片aaaa**毛片| 免费福利在线播放| 综合亚洲欧美日韩一区二区| 国产中文字幕在线免费观看| 黄网站免费观看| 天天做天天做天天综合网| 中文国产成人精品久久下载| 日本免费无遮挡吸乳视频电影| 久久综合香蕉国产蜜臀AV| 欧美俄罗斯乱妇| 十九岁日本电影免费完整版观看| 被女同桌调教成鞋袜奴脚奴| 4jzbtv四季彩app下载| 欧美精品偷自拍另类在线观看 | 欧美国产伦久久久久| 亚洲精品动漫免费二区| 野花香社区在线视频观看播放 | 向日葵视频app免费下载| 草草浮力影院第一页入口| 国产色视频免费| 中文天堂最新版www在线观看| 日本免费v片一二三区|