Main Content

copyTo

Class: polyspace.Options
Namespace: polyspace

Copy common settings between Polyspace options objects

Syntax

optsFrom.copyTo(optsTo)

Description

optsFrom.copyTo(optsTo) copies the common options from optsFrom to optsTo. The options objects do not need to be the same type of options object. This method copies only properties that are common between the two objects.

Input Arguments

expand all

Option object that you want to copy properties from, specified as a polyspace.Options or polyspace.ModelLinkOptions object.

Example: opts = polyspace.Options;

Option object that you want to copy properties to, specified as a polyspace.Options or polyspace.ModelLinkOptions object.

Example: opts = polyspace.Options;

Examples

expand all

This example shows how to set the properties of one options object and then copy that object to another one.

Create a Polyspace options object and set properties.

opts1 = polyspace.Options();
opts1.Prog = 'DataRaceProject';
opts1.Sources = {'datarace.c'};
opts1.TargetCompiler.Compiler = 'gnu4.9';

Create another object and use copyTo to copy over options from the previous object.

opts2 = polyspace.Options();
opts1.copyTo(opts2);

Version History

Introduced in R2016b