Install the P4 for MATLAB and Simulink

This chapter describes the installation process for the P4 for MATLAB and Simulink.

P4 for MATLAB and Simulink is compatible with MATLAB 2017b and later. For a complete list of requirements and limitations, see the P4 for MATLAB and Simulink Release Notes.

If you installed an earlier version of P4 for MATLAB and Simulink using a jar file, you must edit the classpath.txt file to delete the Perforce Integration lines and restart MATLAB before you install P4 for MATLAB and Simulink. For instructions, see Uninstall the P4 for MATLAB and Simulink jar file.

  1. Download the P4 for MATLAB and Simulink MATLAB toolbox file and make a note of where the file is saved.
  2. Start MATLAB, click Open > Open... to display the file open dialog.

  3. Image of selecting the P4 for MATLAB and Simulink file

  4. Select the P4 for MATLAB and Simulink MATLAB toolbox file (.mltbx extension) that you downloaded and click Open
  5. The P4 for MATLAB and Simulink plugin is installed. When the Installation Complete message is displayed, click Finish.
  6. The MATLAB Add-On Manager is opened, this enables you to manage the P4 for MATLAB and Simulink plugin.
  7. Image of the MATLAB Add-On Manager

  8. To view the P4 for MATLAB and Simulink plugin details, click the three vertical dots for P4 for MATLAB and Simulink and select View details.
  9. Image of the P4 for MATLAB and Simulink plugin details displayed by the MATLAB Add-On Manager

  10. Close the Add-On Manager and restart MATLAB.
  11. Check that P4 is loaded: open Simulink and select Home > New > Projects > From Source Control. Check that the P4 option is shown in the Source control integration drop-down.

Useful links: