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.

matlab coder C++ executable

Please login with a confirmed email address before reporting spam

Is there any work around for using the "import" function when coverting a matlab *.m file to a C++ executable? I'm trying to convert a COMSOL *.m file to an exe file and I have to use import com.comsol.model.* and import com.comsol.model.util.*

Matlab gives me this response: "Import statements are currently unsupported." and I just wanted to know if COMSOL had a work around for this.

2 Replies Last Post 17 oct. 2013, 06:50 UTC−4

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 15 oct. 2013, 16:22 UTC−4
If anyone is curious, it appears that the answer is 'no' based on this thread from stackoverflow unless COMSOL people have an idea.

stackoverflow.com/questions/19386690/import-function-matlab-coder-and-c-executable
If anyone is curious, it appears that the answer is 'no' based on this thread from stackoverflow unless COMSOL people have an idea. http://stackoverflow.com/questions/19386690/import-function-matlab-coder-and-c-executable

Lars Gregersen COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 17 oct. 2013, 06:50 UTC−4
Hi

The COMSOL API is based on a connection from your application to COMSOL that uses Java. There is no way to avoid this.

You should be able to use Matlab Compiler to compile your Matlab scripts, but you'll still need a working Comsol installation in order to make everything work.


Lars Gregersen
Comsol Denmark
Hi The COMSOL API is based on a connection from your application to COMSOL that uses Java. There is no way to avoid this. You should be able to use Matlab Compiler to compile your Matlab scripts, but you'll still need a working Comsol installation in order to make everything work. Lars Gregersen Comsol Denmark

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.