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

Please login with a confirmed email address before reporting spam

Hello,
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

0 Replies Last Post May 26, 2015, 12:34 p.m. EDT
COMSOL Moderator

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.

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.