function mphstart(varargin)
% MPHSTART Connect MATLAB to a COMSOL server
% 
%   MPHSTART creates a connection with a COMSOL server using the default 
%   port number (which is 2036).
% 
%   MPHSTART(PORT) creates a connection with a COMSOL server using the 
%   specified port number PORT.
% 
%   MPHSTART(ipaddress, port) creates a connection with a COMSOL server 
%   using the specified ipaddress and port number.
% 
%   MPHSTART(ipaddress, port, comsolpath) creates a connection with a 
%   COMSOL server using the specified ipaddress and port number using the 
%   comsolpath that is specified. This is useful if MPHSTART can not find 
%   the location of the Comsol Multiphysics installation
% 
%   MPHSTART can be used to create a connection from within MATLAB when 
%   this is started without using the "COMSOL with MATLAB" option. MPHSTART
%   then sets up the necessary environment and connect to COMSOL.
%   Prior to calling MPHSTART it is necessary to set the path of mphstart.m
%   in the MATLAB path or to change the current directory in MATLAB (e.g. 
%   using the cd command) to the location of the mphstart.m file.
%   A COMSOL server must be started prior to run MPHSTART.
% 
%   Example 1:
%     % Connect to the computer with IP address 192.168.0.1 using port 2037:
%     mphstart('192.168.0.1', 2037)
% 
%   Example 2:
%     % Note that you have to execute these two command in order to use the
%     % ModelUtil commands. This example creates a new model:
%     mphstart
%     import com.comsol.model.*
%     import com.comsol.model.util.*
%     model = ModelUtil.create('Model')

% Copyright 2010-2011 COMSOL
