Dear all,
I am trying to use the Matlab to define an excitation signal in the Circuit & Systems of the CST through the VBA.
Referring to the example below:
2. example for other signal type with different string array size
.Reset
.Name "Tran2"
ReDim arr(3) As String ' (3) means (0 To 3)
arr(0)="0" ' Fmin
arr(1)="1" ' Fmax
arr(2)="2" ' Ampl
arr(3)="false" ' Use FMin/Fmax from Task (optional)
.SetPortSignal("1", "Gaussian", arr) ' Need 3 definitions (optional 4) To define a gaussian signalI am writing the MATLAB code as below:
SimulationTask = invoke(mws,'SimulationTask'); values=["'0'","'1'","'2'"]; % values is a string array in the CST invoke(SimulationTask,'SetPortSignal','1','Gaussian',values); %
however, there is always an error as below:
Error using Interface.CSTStudio_application.OpenFile.SimulationTask/invoke Call failed, Dispatch Exception: Source: CST DESIGN ENVIRONMENT 2024 Description: Invalid signal definition (not a valid string array).
How can I solve this problem?
Thanks!
