Main Content

Install Documentation on Permanently Offline Computers

Since R2023a

When using MATLAB®, you access product documentation on the web, by default. To use the documentation on a computer that is permanently offline, you can download the documentation, copy it to the offline machine, and install it on that computer.

If you typically work with MATLAB while connected to the internet and only occasionally work offline, see Install Documentation for Offline Use.

Prerequisites

  • In this procedure, you download a documentation ISO (Windows® and Linux®) or DMG (macOS) image and mount it on the offline machine. Knowledge of IT concepts is recommended, but not required.

  • The computer you use to download the documentation must have an internet connection.

  • To download the documentation, you must have a MathWorks® Account. Installing the documentation on the offline computer does not require a MathWorks Account.

  • Both the computer you use to download the documentation and the offline computer must have more than 10 GB of available disk space to accommodate the size of the documentation ISO or DMG image.

  • MATLAB must already be installed on the offline computer.

Download Documentation (Requires Internet Connection)

To download the documentation for R2024a, in the Operating Systems list shown here, select the operating system for the target offline machine. Then, click Download documentation.

To download documentation for other releases, follow these steps:

  1. From MathWorks Downloads, in the Select Release list, select the release you want to download.

  2. From the I Want To list, select Get ISOs and DMGs.

  3. Expand Get MATLAB and Simulink Product Documentation.

  4. Click the Learn more link to open the instructions for downloading and installing the documentation for the selected release. Follow the instructions on that page instead of this page.

Copy Documentation to Offline Machine

Copy the documentation ISO or DMG image that you downloaded to the offline machine using removable media or a shared network location. Then, on the offline machine, mount the documentation ISO or DMG image using the standard process for your platform. For more details, see How do I install MathWorks products using an ISO or DMG image?

Install Documentation on Offline Machine

Install the documentation on the offline machine using the mpm command line tool. mpm is included as part of the downloaded documentation ISO or DMG image.

Note

Perform these steps from the command line for your operating system. Do not run these commands from MATLAB.

  1. From the operating system command line, navigate to the folder within the mounted image that contains the documentation installer.

    cd mountedDocImage/bin/arch

    • mountedDocImage is the root of the mounted documentation ISO or DMG image.

    • arch is the operating system architecture folder of the ISO or DMG image, such as win64, glnxa64, maci64, or maca64.

  2. Run the documentation installer by using the mpm install-doc command. Specify the --matlabroot option to set the folder where MATLAB is installed on the offline machine.

    Windows

    Syntax:

    .\mpm install-doc --matlabroot=matlabroot
    Example:
    .\mpm install-doc --matlabroot="C:\Program Files\MATLAB\R2024a"
    If the matlabrootfolder path includes spaces, enclose the path in double quotes, as shown in the example.

    Linux or macOS

    Syntax:

    ./mpm install-doc --matlabroot=matlabrootfolder
    Example:
    ./mpm install-doc --matlabroot=/home/username/matlab

    By default, mpm installs the documentation to the support package root folder within MATLAB. To find the support package root, use the function matlabshared.supportpkg.getSupportPackageRoot (MATLAB).

    To specify a different location for the documentation, use the --destination option. If you mount the documentation ISO or DMG image in a location other than where MATLAB is installed, such as a network drive, use the --source option to provide the complete path to the installer files.

    Windows

    .\mpm install-doc --matlabroot=matlabrootfolder --source=docinstallfolder --destination=destinationfolder

    Linux or macOS

    ./mpm install-doc --matlabroot=matlabrootfolder --source=docinstallfolder --destination=destinationfolder

    Note

    If the error Conflicting release versions appears during installation, verify that the documentation ISO or DMG image is for the same release as the MATLAB software installed on the offline machine. The release name is included in the filename of the ISO or DMG image.

  3. Unmount the documentation ISO or DMG image. If you need to reclaim the disk space, delete the image.

Configure MATLAB to Use Installed Documentation

Update the MATLAB preferences so that MATLAB opens the installed documentation instead of the web documentation.

  1. Open MATLAB.

  2. On the Home tab, in the Environment section, click Preferences.

  3. In the left pane of the Preferences dialog box, click MATLAB, and then click Help.

  4. Under Documentation Location, select Installed locally.

  5. This step is required only if you installed the documentation somewhere other than the default location by using the --destination flag.

    Update the documentation root so that MATLAB points to where you installed the documentation.

    1. Open the MATLAB startup.m file. If this file does not exist, create a blank file with this name. Commands specified in this file run when MATLAB starts up. For more details on startup.m files, see Startup Options in MATLAB Startup File (MATLAB).

    2. In your startup.m file, add this line to set the documentation root to the new documentation location. newDocInstallFolder is the path to the folder where you installed the documentation.

      docroot('newDocInstallFolder/help')
    3. Restart MATLAB.

Verify Local Installation

Verify that the documentation opens locally. At the MATLAB command prompt, enter: doc

  • If the documentation home page opens, place your cursor on one of the links on the page that opens and check the format of the URL that appears in the bottom-left corner. If the URL is a local file path (for example, file:///C:/ProgramData/MATLAB/...), then MATLAB is opening the local documentation.

  • If a blank page opens, or if the documentation home page URLs display web paths (for example, https://www.mathworks.com/help/...), then MATLAB is still opening the web documentation. Update MATLAB to point to the locally installed documentation, as described in Configure MATLAB to Use Installed Documentation.

Update Documentation on Offline Machine

To update installed documentation after adding or removing products, or to install the most recent documentation, repeat the previous procedures.

Related Topics