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.
Connect to COMSOL through MATLAB on OSX/MAC
Posted 02.07.2016, 17:16 GMT-4 Version 5.2 1 Reply
Please login with a confirmed email address before reporting spam
Hi,
So I've got this bit of code written in matlab that starts up the Comsol multiphysics server and runs some sims on it or whatever. Anyway, the issue is that this code was written on a windows machine, but I'm running it on a mac and don't have windows available to me at the moment.
In principle, I don't see why it shouldn't be possible to connect to the mphserver with mac, but I am at a total loss with regards to how to actually accomplish that. So, please, I really need some help with this.
Here is the code that starts COMSOL from matlab (written for windows)
PathCOMSOL = 'C:/Program Files/COMSOL/COMSOL51/Multiphysics/';
<Irrelevant code>
% connect MATLAB to COMSOL. The first command below uses the "dos.m"
% function
dos(['"',PathCOMSOL,'bin/win64/comsolmphserver.exe" -graphics &']);
addpath([PathCOMSOL,'mli']);
mphstart
Now what I've gathered is that the dos.m function opens up a cmd window in windows and executes some command, presumably that which runs the mphserver .exe. Obviously, this command doesn't exist in mac, but I don't know what the equivalent command would be in mac.
Furthermore, I don't know what the path should be. I know where my comsol installation is in mac, but I'm not even sure which files I need to actually run to connect to the server through matlab.
So, yeah, I really need to get this figured out and I have no idea what to do. Please don't hesitate to ask me for clarification.
Thanks
So I've got this bit of code written in matlab that starts up the Comsol multiphysics server and runs some sims on it or whatever. Anyway, the issue is that this code was written on a windows machine, but I'm running it on a mac and don't have windows available to me at the moment.
In principle, I don't see why it shouldn't be possible to connect to the mphserver with mac, but I am at a total loss with regards to how to actually accomplish that. So, please, I really need some help with this.
Here is the code that starts COMSOL from matlab (written for windows)
PathCOMSOL = 'C:/Program Files/COMSOL/COMSOL51/Multiphysics/';
<Irrelevant code>
% connect MATLAB to COMSOL. The first command below uses the "dos.m"
% function
dos(['"',PathCOMSOL,'bin/win64/comsolmphserver.exe" -graphics &']);
addpath([PathCOMSOL,'mli']);
mphstart
Now what I've gathered is that the dos.m function opens up a cmd window in windows and executes some command, presumably that which runs the mphserver .exe. Obviously, this command doesn't exist in mac, but I don't know what the equivalent command would be in mac.
Furthermore, I don't know what the path should be. I know where my comsol installation is in mac, but I'm not even sure which files I need to actually run to connect to the server through matlab.
So, yeah, I really need to get this figured out and I have no idea what to do. Please don't hesitate to ask me for clarification.
Thanks
1 Reply Last Post 05.07.2016, 06:17 GMT-4