Please login with a confirmed email address before reporting spam
Posted:
8 months ago
15 apr 2024, 11:02 GMT-4
Updated:
8 months ago
15 apr 2024, 11:02 GMT-4
Hello,
I'm not sure if this is a great answer but I have COMSOL with MATLAB package. This allows me to run COMSOL on matlab with ease. Have you tried using that package?
Hello,
I'm not sure if this is a great answer but I have COMSOL with MATLAB package. This allows me to run COMSOL on matlab with ease. Have you tried using that package?
Please login with a confirmed email address before reporting spam
Posted:
8 months ago
23 apr 2024, 04:13 GMT-4
Updated:
8 months ago
23 apr 2024, 04:13 GMT-4
Hi yes I have installed that package but I failed to run any program. Is turning on COMSOL with MATLAB only sufficient?
Hi yes I have installed that package but I failed to run any program. Is turning on COMSOL with MATLAB only sufficient?
Lars Gregersen
COMSOL Employee
Please login with a confirmed email address before reporting spam
Posted:
8 months ago
30 apr 2024, 02:45 GMT-4
Updated:
8 months ago
1 mag 2024, 16:00 GMT-4
Hi Carl Xu
When you save a COMSOL model as an M-file all the steps that were carried out are reflected in that M-file. This means that if you solved the model while setting up the model then these calls to the solver are kept in the M-file.
The reason is that sometimes a solution may depend on previous solved problems. This is often not what you want.
On the File menu there is an item called "Compact History". It extracts the necessary statements that are required to give you an M-file that will give you a model at the state it is currently in, but without any solutions.
After having called Compact History you can save an M-file that should be easy to run.
If you are new to LiveLink for Matlab I recommend reading the manual called "Introduction to LiveLink for Matlab"
-------------------
Lars Gregersen
Comsol Denmark
Hi Carl Xu
When you save a COMSOL model as an M-file all the steps that were carried out are reflected in that M-file. This means that if you solved the model while setting up the model then these calls to the solver are kept in the M-file.
The reason is that sometimes a solution may depend on previous solved problems. This is often not what you want.
On the File menu there is an item called "Compact History". It extracts the necessary statements that are required to give you an M-file that will give you a model at the state it is currently in, but without any solutions.
After having called Compact History you can save an M-file that should be easy to run.
If you are new to LiveLink for Matlab I recommend reading the manual called "Introduction to LiveLink for Matlab"
Please login with a confirmed email address before reporting spam
Posted:
8 months ago
4 mag 2024, 09:42 GMT-4
Dr Gregersen, Thank you very much for your suggestion. Whenever I run .m (saved from .mph) in comsol with matlab, matlab shows "busy" on the bottom left which means it is running. But after a while (= The time needed for the simulation), matlab reports errors (only a snippet below)
test
Error using test
Java exception occurred:
Exception:
com.comsol.util.exceptions.FlException: Syntax error in expression
Messages:
Syntax error in expression.
Dr Gregersen, Thank you very much for your suggestion. Whenever I run .m (saved from .mph) in comsol with matlab, matlab shows "busy" on the bottom left which means it is running. But after a while (= The time needed for the simulation), matlab reports errors (only a snippet below)
>> test
Error using test
Java exception occurred:
Exception:
com.comsol.util.exceptions.FlException: Syntax error in expression
Messages:
Syntax error in expression.
Please login with a confirmed email address before reporting spam
Posted:
8 months ago
4 mag 2024, 09:59 GMT-4
Updated:
8 months ago
4 mag 2024, 10:00 GMT-4
Sometimes I am lucky enough to be able to successfully run an m file, after matlab stops being busy, no plot or no new mph file is ever created. Then where is the result stored?
Sometimes I am lucky enough to be able to successfully run an m file, after matlab stops being busy, no plot or no new mph file is ever created. Then where is the result stored?