3.2. Installation of the MATLAB Client

Add the path of the downloaded folder FORCESPRO to the MATLAB path by using the command addpath DIRNAME, e.g. by typing:

addpath /home/user/FORCESPRO

on your MATLAB command prompt. Alternatively, you can add the path of the FORCESPRO folder via the graphical user interface of MATLAB as seen in Figure 3.1.

../_images/Installation_SetPath.jpg

Figure 3.1 Adding the FORCESPRO folder to the MATLAB path.

Having added the root folder of the FORCESPRO MATLAB client to the MATLAB path one configures the client to the specific MATLAB version by running

FORCESconfigureClient;

in the MATLAB command window. After the FORCESPRO MATLAB client has been configured one can save the MATLAB path in order to always have access to FORCESPRO when initiating a new MATLAB session. Alternatively one perform the above 2 steps whenever initiating a new MATLAB session.

3.2.1. System requirements

FORCESPRO is supported on Windows, macOS and the different Linux distributions.

For the MATLAB and Simulink interfaces, 32 or 64 bit MATLAB 2012b (or higher) is required. Older versions might work but have not been tested. A MEX compatible C compiler is also required. A list of compilers that are supported by MATLAB can be found in https://www.mathworks.com/support/sysreq/previous_releases.html.

Run:

mex -setup

to configure your C compiler in MATLAB.

3.2.2. Keeping FORCESPRO up to date

FORCESPRO is actively developed and client modifications are frequent. Whenever your client version is not synchronized with the server version, you will receive a code generation error notifying you that your client is out of date.

To update your client simply type:

updateClient

on your MATLAB command prompt. updateClient without any arguments uses the default embotech server to grab the client, and updates all corresponding client files. The command:

updateClient(URL)

overrides the default server selection and uses the server located at URL instead.

Alternatively, the FORCESPRO client may also be updated through Python, see Keeping FORCESPRO up to date.

3.2.3. Installing and running older versions of FORCESPRO

Older versions of FORCESPRO can be installed and run by specifying the server URL as https://forces-X-Y-Z.embotech.com, replacing X-Y-Z with the version numbers of a selected FORCESPRO version vX.Y.Z. First, sync your client to the server by updating it with

updateClient('https://forces-X-Y-Z.embotech.com')

Then, in order to generate a solver, set the code generation server as

codeoptions.server = 'https://forces-X-Y-Z.embotech.com';