Setup - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Configuring a Computer for MATLAB(R)

 

MATLAB® Version Requirements

Silicon Macs

Testing the Maple-MATLAB® Link

Updating Configuration Files

MATLAB® Version Requirements

  

For details on supported platforms, visit the Maplesoft System Requirements website. 64-bit Maple requires 64-bit MATLAB® on the same platform. Also, note that older and newer versions of MATLAB® may work, but may not be tested by Maplesoft.

Silicon Macs

• 

The Maple-MATLAB® link is available on Apple Silicon Macs when running native binaries, and requires native Matlab. For more information, see Platform Specific Issues.

Testing the Maple-MATLAB® Link

  

To determine if the link works on your platform, run the following commands in the Maple worksheet.

Matlab[setvar]("x",3.14);

  

This command establishes the link and assigns the variable x= 3.14 in MATLAB®.

Matlab[getvar]("x");

  

If a value of 3.14 is returned in the worksheet, the Maple-MATLAB® link works on your platform.

Updating Configuration Files

  

You might have to update your configuration files to set up the Maple-MATLAB® link. Follow the instructions for your platform.

Windows

  

The following instructions describe how to set the path and update the Windows Registry. These instructions assume that you are logged on as an administrator and that the MATLAB® installation directory is $MATLAB. Substitute the appropriate drive letter and directory name for $MATLAB (for example, c:\Program Files\Matlab\R2021b). The Windows path needs to include the directories $MATLAB\bin;$MATLAB\bin\win64.

1. 

To set the path, open the System Properties window in the Control Panel:

  

Open the Control Panel and navigate to System and Security>System. Select Advanced System Settings.

2. 

Double-click the Environment Variables button. Double-click Path.

  

You must specify the correct version of MATLAB® for the Path variable.

  

If there is an entry with Value PATH, click that entry. For Windows, prepend $MATLAB\bin;$MATLAB\bin\win64 to the Value field. Use a semicolon to separate the new path from the previous path, and click OK.  If you have multiple versions of MATLAB® installed, make sure that the version you want to use with Maple is listed first.

  

If no PATH Value entry exists, add the text PATH to the Variable field, and in the Value field, enter $MATLAB\bin;$MATLAB\bin\win64 for 64-bit Windows and click OK.

3. 

If prompted, restart your computer for the PATH changes to take effect.

4. 

Start Maple. To determine if the link works, repeat the steps from the "Testing the Maple-MATLAB® Link" section above. If either Matlab[setvar]("x",3.14); or Matlab[getvar]("x"); return an error, proceed to the next step.

5. 

To update the registry, click the Windows Start button, and choose Run. Enter the command matlab /regserver in the text region of the Run command and click Ok.

6. 

Start Maple. To determine if the link works, repeat the steps from the "Testing the Maple-MATLAB® Link" section above. If either Matlab[setvar]("x",3.14); or Matlab[getvar]("x"); return an error, review the first six steps. If problems persist, contact Maple Technical Support.

Linux and macOS

  

Some environment variables must be defined in the maple script $MAPLE/bin/maple (on macOS, the maple script is located in /Library/Frameworks/Maple.framework/Versions/{version}/, where {version} refers to your version of Maple. The following instructions describe how to edit this script. Use any text editor that preserves line breaks. These instructions assume that MATLAB® is installed in /usr/local/matlab. Substitute the appropriate path if necessary.

1. 

Remove the comment characters (#) from the lines defining MATLAB_BASEDIR near the top of the maple script.

MATLAB_BASEDIR=/usr/local/matlab

export MATLAB_BASEDIR

• 

The path to the right of the equals sign next to MATLAB_BASEDIR= must resolve to a valid directory, such that running $MATLAB_BASEDIR/bin/matlab would normally start MATLAB®.

• 

If you are using a network installation that includes multiple platforms, and MATLAB® is not installed in the same directory on each platform, you can use the environment variable $MAPLE_SYS_BIN to specify platform-dependent locations of MATLAB®. For example,

  

 

if [ "$MAPLE_SYS_BIN" = "bin.APPLE_UNIVERSAL_OSX" ] ; then

   MATLAB_BASEDIR=/Applications/MATLAB

   export MATLAB_BASEDIR

else

   MATLAB_BASEDIR=/usr/local/matlab

   export MATLAB_BASEDIR

fi

• 

The MATLAB® engine API used by Maple requires a C shell (csh) to be installed on your system.  If you do not already have it installed, you can make a symbolic link /bin/csh from /bin/sh.

See Also

Matlab[openlink]

Overview of the Matlab package