- 积分
- 1
- 注册时间
- 2013-3-25
- 仿真币
-
- 最后登录
- 1970-1-1
|
楼主 |
发表于 2013-4-2 19:01:30
|
显示全部楼层
来自 北京
我会说我自己又找到答案了么。。。
之前重装COMSOL、MATLAB都各种没用,最后,google一下。。。
在COMSOL的境外论坛里发现了答案。。。
Hi,
this problem seems to occur sometimes when the OS and the software 'do not match'. For example Comsol 4.3 and Matlab r2012a worked together fine on Linux Mint 12, but after upgrading to Linux Mint 13 (based on Ubuntu 12.04 LTS) the 'comsol server matlab' command produces this strange error. I do not know why it happens but I figured out two ways to make it work for me:
1) If you got superuser rights on your machine, try 'sudo comsol server matlab'. I know this is not always possible and also not very nice, so I prefer the second method...
2) Connect Matlab manually to a Comsol instance running in server mode:
- start Comsol in server mode 'comsol server'
- start Matlab
- in Matlab add the path of the mli directory, e.g.: addpath('/usr/local/comsol-4.3/mli');
- then connect to Comsol (and import the libraries for setting up Comsol models):
mphstart;
import com.comsol.model.*;
import com.comsol.model.util.*;
Both methods worked for me - for method 2) I've wrote myself a little batch script to start Comsol connected to Matlab
我就是用了第二种方法之后,才搞定的。
其实就是打开'comsol server'之后打开matlab,将当前目录调到mli directory, e.g.: addpath('/usr/local/comsol-4.3/mli');,然后输入mphstart,然后就OK了!!!
大家有相同的问题的话可以试一试这样 |
|