Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.
Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.
creating geometry in matlab-function different from current matlab-function
Posted Sep 28, 2011, 5:02 p.m. EDT Interfacing, Geometry Version 4.2 1 Reply
Please login with a confirmed email address before reporting spam
i'm tying to use an external matlab-function to create a certain geometry and then assign this geometry to my current model in matlab.
Unfortunately something like the following doesn't work:
model.geometry('myGeometry') = geometryCreationMatlabFunction(param1,param2);
I couldn't find any feature that allows me to import/copy/assign geometries from model B into an existing comsol model A (i also want to avoid saving the geometry as a file and then reimport the whole stuff).
Is there an easy way to get this done?
Udate:
I finally figured out how to do it. All you need to to is create a model in the curent m-file. Then give this model as argument to the external m-file. The external m-file now does something with the model like setting up geometry etc. After that it gives back the model as return value. Thats all :)
Hello Chris Shor
Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.
If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.