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.

Autogenerating geometry in Livelink MATLAB using for loops

Please login with a confirmed email address before reporting spam

Hello, I am currently using the Livelink using MATLAB software and I was wondering if there was an effective way to automate the creation of geometry using for loops.

I would like to be able to be able to make a for loop that will run the create geometry command while changing some parameter such as position while leaving the other parameters unchanged such as for c=1:10

model.component('comp1').geom('geom1').create(ri, 'Rectangle'); model.component('comp1').geom('geom1').feature(ri).set('size', {'width' 'height'*c}); model.component('comp1').geom('geom1').feature(ri).set('pos', {'-width' 'height'});


0 Replies Last Post 13 nov 2019, 00:18 GMT-5
COMSOL Moderator

Hello Owen Steele

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.

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.