Main Content

toScript

Class: polyspace.Options
Namespace: polyspace

Add Polyspace options object definition to a script

Syntax

filePath = opts.toScript(fileName,positionInScript)

Description

filePath = opts.toScript(fileName,positionInScript) adds the properties of a polyspace.Options object to a MATLAB® script. The script shows the values assigned to all the properties of the object. You can run the script later to define the object in the MATLAB workspace and use it.

Input Arguments

expand all

Option object to store in MATLAB script, specified as a polyspace.Options or polyspace.ModelLinkOptions object.

Example: opts = polyspace.Options;

Name or path to script, specified as a character vector. If you specify a relative path, the script is created in subfolder of the current working folder.

Example: 'runPolyspace.m'

Position in script where the object properties are added, specified as 'create' or 'append'. If you specify 'append', the object properties are added to the end of an existing script. Otherwise, a new script is created.

Output Arguments

expand all

Full path to script, specified as a character vector.

Example: 'C:\myScripts\runPolyspace.m'

Version History

Introduced in R2017b