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.
loop in Matlab using Comsol
Posted 26.05.2015, 12:34 GMT-4 Materials, Parameters, Variables, & Functions, Structural Mechanics Version 4.4 0 Replies
Please login with a confirmed email address before reporting spam
I would like to do a repeat loop in Matlab using Comsol structure. I need to declare many different properties. I tried to do it but doesn't work. My code is it:
for a=1:100
model.param.set('A1', a);
model.physics('solid').feature('lemm%d'', A1).set('IsotropicOption', 'CpCs');
model.physics('solid').feature('lemm%d', A1).set('cs_mat', 'userdef');
model.physics('solid').feature('lemm%d', A1).set('cp_mat', 'userdef');
model.physics('solid').feature('lemm%d', A1).set('rho_mat', 'userdef');
model.physics('solid').feature('lemm%d', A1).set('cp', '6000+A1*100');
model.physics('solid').feature('lemm%d', A1).set('cs', '3300+A1*100');
model.physics('solid').feature('lemm%d', A1).set('rho', '7900+A1*100');
end
Someone can help me?
Thanks,
Raphaella Hermont
Hello Raphaella Murta
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.