Configuring a Computer for MATLAB(R)
MATLAB\302\256 Version RequirementsTesting the Maple-MATLAB\302\256 LinkUpdating Configuration Files
<Text-field style="Heading 2" layout="Heading 2" bookmark="bkmrk0"><Font encoding="UTF-8">MATLAB\302\256 Version Requirements</Font></Text-field>
For details on supported platforms, visit the Maplesoft System Requirements web site. 64-bit Maple requires 64-bit MATLAB\302\256 on the same platform. Also, note that older and newer versions of MATLAB\302\256 may work, but may not be tested by Maplesoft.
<Text-field style="Heading 2" layout="Heading 2" bookmark="bkmrk2">Updating Configuration Files</Text-field>
You might have to update your configuration files to set up the Maple-MATLAB\302\256 link. Follow the instructions for your platform.
<Text-field style="Heading 3" layout="Heading 3" bookmark="bkmrk3">Windows</Text-field>
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\302\256 installation directory is $MATLAB. Substitute the appropriate drive letter and directory name for $MATLAB (for example, c:\Program Files\Matlab\R2019b). The Windows path needs to include the directories $MATLAB\bin;$MATLAB\bin\win32.
To set the path, open the System window in the Control Panel:
- Click the Start button, then Control Panel>System. Select the Advanced tab. Double-click the Environment Variables button. Double-click Path.
You must specify the correct version of MATLAB\302\256 for the Path variable.
If there is an entry with Value PATH, click that entry. For 32-bit Windows, prepend $MATLAB\bin;$MATLAB\bin\win32 to the Value field; and for 64-bit 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\302\256 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\win32 for 32-bit Windows, or $MATLAB\bin;$MATLAB\bin\win64 for 64-bit Windows and click OK.
If prompted, restart your computer for the PATH changes to take effect.
Start Maple. To determine if the link works, repeat the steps from the "Testing the Maple-MATLAB\302\256 Link" section above. If either Matlab[setvar]("x",3.14); or Matlab[getvar]("x"); return an error, proceed to the next step.
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. Note: In Windows 7, click the Windows Start button, select All Programs > Accessories > Command Prompt to get a command prompt.
Start Maple. To determine if the link works, repeat the steps from the "Testing the Maple-MATLAB\302\256 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.
<Text-field style="Heading 3" layout="Heading 3" bookmark="bkmrk4">Linux and Macintosh</Text-field>
Some environment variables must be defined in the maple script $MAPLE/bin/maple (on Macintosh systems, 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\302\256 is installed in /usr/local/matlab. Substitute the appropriate path if necessary.
Remove the comment characters (#) from the lines defining MATLAB_BASEDIR near the top of the maple script.
MATLAB_BASEDIR=/usr/local/matlabexport 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\302\256.
If you are using a network installation that includes multiple platforms, and MATLAB\302\256 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\302\256. For example,
if [ "$MAPLE_SYS_BIN" = "bin.APPLE_UNIVERSAL_OSX" ] ; then MATLAB_BASEDIR=/Applications/MATLAB export MATLAB_BASEDIRelse MATLAB_BASEDIR=/usr/local/matlab export MATLAB_BASEDIRfi
The MATLAB\302\256 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 AlsoMapleToolboxInstallationMatlab[openlink]Overview of the Matlab package