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.

How can I convert Comsol3.5 matlab script to a higher version?

Please login with a confirmed email address before reporting spam

I recently find a script wroten by matlab in Comsol3.5, the script is like:

  1. para.irho=find(asseminit(fem,'Init',{,{'rho' 1},'Out','U''U'));
  2. para.iphi=find(asseminit(fem,'Init',{,{'phi' 1},'Out','U''U'));
  3. meshinfo=xmeshinfo(fem,'out','nodes'););
  4. index_rho=strmatch('rho',meshinfo.names); index_phi=strmatch('phi',meshinfo.names);
  5. sendof_sequ=find(meshinfo.dofs(index_rho,:)~=0);
  6. para.isen=meshinfo.dofs(index_phi,sendof_sequ)';
  7. Vrho=assemble(fem,'Out',{,{'L'},},'solcomp','rho'); Vdomain=sum(Vrho);

how can I convert this script into comsol5.6 or higher version script? I read the comsol3.5 help doc, but find it's hard to search the counterpart in help doc of comsol5.6. Please give me some hints .


0 Replies Last Post Mar 19, 2024, 3:57 a.m. EDT
COMSOL Moderator

Hello Qin Liu

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.