Export 3D radiation pattern in CST to Matlab
33 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Wilfrid RENKANGA MBATCHI
am 1 Jan. 2024
Kommentiert: Nikolaos
vor etwa 23 Stunden
Hello everyone, is there a kind soul who could explain to me how I can retrieve the 3D field of an antenna array to use it in my MATLAB calculations? For instance, I want to apply this formula:

0 Kommentare
Akzeptierte Antwort
William Rose
am 1 Jan. 2024
Bearbeitet: William Rose
am 2 Jan. 2024
[edit: Fix spelling errors. Add readmatrix() to my answer. Add discussion of some pros and cons of different data-import functions.]
It seems to me that you may have two different questions. If I misunderstand, please explain.
Question 1. How do I get 3D data from the CST suite into Matlab?
CST has an option to export data in text format, also known as ASCII format. Use that option to create a .txt file. Then use the Matlab interactive import data tool, or use readtable(), or use readmatrix(), or strip off the header info in the .txt file, then use load() to import the data. See the help for import data tool, readtable, readmatrix, and load for details. readtable() creates a table, and if you are new to matlab, you may find it slightly more complicated to work with a table. An advantage of readtable(), compared ot load(), is that readtable() brings the column header information into the Matlab environment. load() is simple to use. readtable() can read data from different types of text files and .xls and .xlsx files. readtable() can skip a certain number of header lines. readtable() can read a specific rectangular cell range, if the input file is a .xls or .xlsx.
Question 2. Once I have imported the 3D data, how do I do numerical integration?
That depends quite a lot on the data format and the problem, so I suggest you post a data file, and specify variables and limits of integration, etc., in order to get useful assistance.
Good luck!
4 Kommentare
William Rose
vor etwa 5 Stunden
The matlab code you shared creates a string constant named vba_constant, which has 13 lines (12 newline characters). Then the code calls function mws.invoke() which is part of CST Microwave Studio. I don;t have CST Microwave Studio so I cannot explain why mws.invoke() does not producing the desired results. Your code doesn't use vba_constant. Did you mean to pass vba_constant to mws.invoke()?
I recommend you join the online discussion group for CST Microwave Studios, and post your question there.
Nikolaos
vor etwa 3 Stunden
Yeah you are right I didnt put the hole code here I am creating a file with the name mcr_file.mcr and I am passing that to the invoke function. But it gives me errors.I was thinking If you know any other way to pass the vba to cst to extract the results from the simulation.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Simulink Functions finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!