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.

iterator operator

Please login with a confirmed email address before reporting spam

Hi there,

I am working with comsol 5.3, and I would like to define a force using mathematical series.
My question is how to write this on a force field on comsol (matlab code) :

S=0;
for i=1:100
S=S+f(i);
end

With f is a given function.

2 Replies Last Post 24 mai 2017, 06:12 UTC−4
Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 7 years ago 23 mai 2017, 08:12 UTC−4
Hello Achref,
COMSOL offers the sum operator to perform such summations. See Reference Manual, version 5.3, page 239 and 251.
Best regards,
Jeff
Hello Achref, COMSOL offers the sum operator to perform such summations. See Reference Manual, version 5.3, page 239 and 251. Best regards, Jeff

Please login with a confirmed email address before reporting spam

Posted: 7 years ago 24 mai 2017, 06:12 UTC−4
Thank you this was really helpful
Thank you this was really helpful

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.