Main Content

polyspacesetup

Integrate Polyspace installation with Simulink

Description

polyspacesetup('install') integrates Polyspace® from the default installation folder with MATLAB® or Simulink®. If you installed Polyspace in a nondefault folder, the function prompts you for the installation folder. See Installation Folder.

To run MATLAB scripts for Polyspace analysis, install MATLAB and Polyspace in separate folders, and then integrate them by using this function. See Integrate Polyspace with MATLAB and Simulink or Integrate Polyspace Server Products with MATLAB.

example

polyspacesetup('install', 'polyspacefolder', folder) integrates Polyspace installed in the folder folder with MATLAB or Simulink.

example

polyspacesetup('install', 'polyspacefolder', folder, 'silent', isSilent) integrates Polyspace installed in the folder folder with MATLAB or Simulink silently when isSilent is true or with a prompt if isSilent is false. When you start MATLAB with the option -batch, isSilent is set to true by default. If you use a nondefault folder to install Polyspace and then do not specify the folder in folder, you are prompted to specify the install location even if you use -batch to start MATLAB.

example

polyspacesetup('uninstall') unlinks the currently linked installation of Polyspace from MATLAB.

polyspacesetup('showpolyspacefolders') lists all Polyspace folders that are linked to your current installation of MATLAB.

Examples

collapse all

To integrate Polyspace with MATLAB or Simulink, use the function polyspacesetup.

Open MATLAB with administrator or root privilege.

At the MATLAB command prompt, enter:

polyspacesetup('install');
If you install Polyspace in the default folder C:\Program Files\Polyspace\R2024b, the command integrates Polyspace with MATLAB. You might be prompted that the workspace will be cleared and all open models closed. Click Yes. The process might take a few minutes to complete. When you start MATLAB with the -batch option, the installation completes without any prompts.

If a Polyspace installation is not detected at the default location, you are prompted for the installation location. Use this command:

polyspacesetup('install', 'polyspaceFolder', Folder)
where Folder is the Polyspace installation folder.

Restart MATLAB.

To integrate Polyspace with MATLAB in the command line noninteractively, start MATLAB with the startup option -batch. See Commonly Used Startup Options.

When you start MATLAB with the startup option -batch, polyspacesetup is silent by default. That is, the function does not emit any messages unless there is any input error.

  1. Open a Windows command-line prompt with administrator or root privilege.

  2. To ensure that the integration takes place noninteractively, specify the install folder for Polyspace. At the command-line prompt, enter:

    matlab -batch "polyspacesetup('install','polyspaceFolder',folder)"
    where folder is the installation location of Polyspace.

  3. If the integration is successful, this message is displayed:

    Polyspace plug-in: installation complete.
    Restart MATLAB before using Polyspace plug-in.

    You can also enter the command in a script. For instance, you might have a script that performs the installations of MATLAB and Polyspace. Append the preceding command to your script to integrate MATLAB and Polyspace noninteractively.

To integrate Polyspace with MATLAB or Simulink silently, use the function polyspacesetup. By default, Polyspace is installed in the folder C:\Program Files\Polyspace\R2024b.

Open MATLAB with administrator or root privilege.

At the MATLAB command prompt, enter:

polyspacesetup('install', 'polyspaceFolder', Folder, 'silent', true);
where Folder is the Polyspace installation folder. The process might take a few minutes to complete.

Restart MATLAB.

Input Arguments

collapse all

Path to the Polyspace installation folder specified as a character vector.

Example: 'C:\Program Files\Polyspace\R2024b'

Data Types: char

Whether to perform the integration silently (without prompting for user input), specified as true or false. When you start MATLAB with the -batch option, this argument is set to true by default.

Data Types: logical

Version History

Introduced in R2019a