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.

LiveLink Matlab +Comsol 4.1

Please login with a confirmed email address before reporting spam

Hi !

1. Does anyone know if Comsol 4.1 works with an older version of Matlab (older than R2010b) for using LiveLink for Matlab?


2. I would like to use the LiveLink for Matlab with Comsol 4.1.
I have taken all the steps written in the guide (create a model in Comsol, save it as m-file, start Comsol+Matlab,
add the path to the saved m-file, run the m-file.

Matlab responds:

?? Undefined variable "ModelUtil" or class "ModelUtil.create"

I also tried by writing the commands

>> import com.comsol.model.*

>> import com.comsol.model.util.*

>> model=ModelUtil.create('Model')

and run the m-file but the answer is the same.

What else can I do?

Thanks

gabriela

2 Replies Last Post Jul 11, 2011, 8:23 a.m. EDT

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jul 10, 2011, 7:50 p.m. EDT
Agreed, I have the same problem and it is annoying.

I need to connect to comsol through matlab first, but can't seem to import any of the com.comsol classes.

Manual is not of much help, though that ain't surprising :)
Agreed, I have the same problem and it is annoying. I need to connect to comsol through matlab first, but can't seem to import any of the com.comsol classes. Manual is not of much help, though that ain't surprising :)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jul 11, 2011, 8:23 a.m. EDT
Hi,

See p.15 of the Comsol 4.1 Installation and Operations Guide: The LiveLink interface for MATLAB is compatible with MATLAB 2009b and MATLAB 2010a.


Regarding the error messages, it's maybe because you typed 'clear all' --> it clears all the comsol functions and you can't run comsol commands anymore. Replace 'clear all' with 'clear variables' to do a little clean up each time you run a model.

Good luck
Hi, See p.15 of the Comsol 4.1 Installation and Operations Guide: The LiveLink interface for MATLAB is compatible with MATLAB 2009b and MATLAB 2010a. Regarding the error messages, it's maybe because you typed 'clear all' --> it clears all the comsol functions and you can't run comsol commands anymore. Replace 'clear all' with 'clear variables' to do a little clean up each time you run a model. Good luck

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.