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 problem
Posted May 9, 2011, 5:00 a.m. EDT LiveLink for MATLAB 3 Replies
Please login with a confirmed email address before reporting spam
Dear Sir/Madam,
I have previously tried earlier version of COMSOL, Now I am using COMSOL 4.1 and MATLAB 2010b on windows 7 machine. I follow the instruction inside the Livelink manual. However, I cannot use COMSOL functionality in MATLAB yet. As an example for [transport_and_adsorption.mph] , here is what I do:
1-connect to the COMSOL Multiphysics 4.1 server,
2-add the MLI folder to MATLAB path,
3- Export the MPH file "Export Model to Server";
4- Save Model as M-File
5- Type these in MATLAB:
mphstart
model = mphload('transport_and_adsorption')
transport_and_adsorption
Matlab shows:
Type: Root
Tag: Model
Identifier: root
I have attached the structure forms in MATLAB at this stage. I expect that keywords like femtime, works here, however it does not. Also when I call the same function (transport_and_adsorption) it only gives the above output..no calculation!
Would you please advice on these two inquires?
1-What I do to link MATALAB and COMSOL is correct or not? If not, what else shall I do?
2- How can I command COMSOL generated m-file or comsol mph file from MATLAB for a certain computational purpose?
I look forward to hearing from you.
Best regards
Mona
I have previously tried earlier version of COMSOL, Now I am using COMSOL 4.1 and MATLAB 2010b on windows 7 machine. I follow the instruction inside the Livelink manual. However, I cannot use COMSOL functionality in MATLAB yet. As an example for [transport_and_adsorption.mph] , here is what I do:
1-connect to the COMSOL Multiphysics 4.1 server,
2-add the MLI folder to MATLAB path,
3- Export the MPH file "Export Model to Server";
4- Save Model as M-File
5- Type these in MATLAB:
mphstart
model = mphload('transport_and_adsorption')
transport_and_adsorption
Matlab shows:
Type: Root
Tag: Model
Identifier: root
I have attached the structure forms in MATLAB at this stage. I expect that keywords like femtime, works here, however it does not. Also when I call the same function (transport_and_adsorption) it only gives the above output..no calculation!
Would you please advice on these two inquires?
1-What I do to link MATALAB and COMSOL is correct or not? If not, what else shall I do?
2- How can I command COMSOL generated m-file or comsol mph file from MATLAB for a certain computational purpose?
I look forward to hearing from you.
Best regards
Mona
Attachments:
3 Replies Last Post Jul 29, 2014, 5:34 a.m. EDT