- 易迪拓培训,专注于微波、射频、天线设计工程师的培养
Problem with linking between Matlab, CST and applying Genetic Algorithm(GA)
I got a problem when I try to use matlab connecting with CST 2010 and applying GA for simulation antenna. I setup for maximum of iterations (maxit) 100. But my simulation always stopped at the iteration of 26th. And a message appeared as "Server threw an exception". Matlab can not call CST to keep run simulation. I also attack my code (simple code: just open CST and save and close, the same problem occurred at iteration of 25th). I think that because of limiting the number of simulation processes, which continuously open, in CST. But I don't know how to fix this.
Does anyone know about it? and can help me solve my problem.
Thank you so much!
Best regards,
TrinhVanSon
Hallo.. Trinhvanso.
Hope you will be fine..
Actually I'm also working on linking CST MWS with Matlab for my Waveguide cavity..
plzz if you know about how to link the CST with Matlab..plzz let me know..I'm doing Master in Electrical engineering from University Rostock Germany.
thanks
Umar
- - - Updated - - -
Hallo.. Trinhvanso.
Hope you will be fine..
Actually I'm also working on linking CST MWS with Matlab for my Waveguide cavity..
plzz if you know about how to link the CST with Matlab..plzz let me know..I'm doing Master in Electrical engineering from University Rostock Germany.
thanks
Umar
>> cst2 = actxserver('MWStudio.Solver');
cst2.invoke('Start');
? Error using ==> actxserver at 91
Server creation failed. Invalid ProgID 'MWStudio.Solver'
Why this error is coming ; plz explain and guide
The following syntax is used to directly open a new CST MWS window within Maltab environment:
cst = actxserver('CSTStudio.application');
mws = invoke(cst, 'NewMWS');
Translate CST-specific VBA commands to Matlab commands, refer to below example for creating a brick
VBA:
With Brick
.Reset
.Name ("brick1")
.Component ("component1")
.Material ("PEC")
.Xrange (0, 2)
.Yrange (0, 3)
.Zrange (0, "a+3")
.Create
End With
Translate to Matlab commands
brick=invoke(mws,'Brick');
invoke(brick, 'Reset');
invoke(brick, 'Name', 'brick1');
invoke(brick, 'Component','component1');
invoke(brick, 'Material', 'PEC');
invoke(brick, 'Xrange', '0', '2');
invoke(brick, 'Yrange', '0', '3');
invoke(brick, 'Zrange', '0', 'a+3');
invoke(brick, 'Create');
release(brick);
Does anyone know how to run a CST macro from Matlab? Also, how do you get the results from the result tree using Matlab?
Hi everyone
I hope someone can help me cause i really need help now!
i need to run cst for about 200 times and i have to change some parameters each time. i've designed the model and im having problem with changing parameters in matlab as far as i know we can define bricks... and form a new model in cst using matlab but i want to know whether or not we can change parameters of a pre defined model in cst with matlab or not. and does anyone know how can we export the data more rapidly than manually exporting? is there anyway ?
thank you :)
Hi y.ettefagh,
Actually, I already got the same problem when I try to call and run CST from Matlab many times. But it seems impossible.
Therefore, in my case, I built the model with parameters in CST firstly. Then I use Matlab to call this CST file and update my parameters by matlab commands.
Using the following syntax
invoke(mws,'StoreParameter','name_parameters',value_parameter); invoke(mws,'Rebuild');
"value_parameter" is value of parameter that you want to change to
By using this way, you can call and run CST as many times as you want.
I hope this will be helpful for you.
Rgs,
Hi trinhvanson.
thanks for your attention
i used the syntax winopen to open my cst model, as far as i undrestood the commands:
"cst = actxserver('CSTStudio.application');
mws = invoke(cst, 'NewMWS'); "
cant open a pre-defined model. so how can i define 'mws' as you said?
thank you kindly
申明:网友回复良莠不齐,仅供参考。如需专业解答,请学习易迪拓培训专家讲授的CST视频培训教程。
上一篇:Design Helical Antenna Using CST
下一篇:phase of E field in CST