Main Content

isConnector

Find if instance is connector instance

Description

flag = isConnector(instance) finds whether the instance specified by instance is a connector instance.

Note

This function is part of the instance programmatic interfaces that you can use to analyze the model iteratively, element-by-element. The instance refers to the element instance on which the iteration is being performed.

example

Examples

collapse all

Load the small unmanned aerial vehicle (UAV) model, create an architecture instance, and query whether the instance modified by the Connectors property is a connector instance.

openProject("scExampleSmallUAV");
model = systemcomposer.loadModel("scExampleSmallUAVModel");
instance = instantiate(model.Architecture,"UAVComponent","NewInstance");
flag = isConnector(instance.Connectors(1))
flag = logical
   1

Input Arguments

collapse all

Output Arguments

collapse all

Whether instance is systemcomposer.analysis.ConnectorInstance, returned as 1 (true) or 0 (false).

Data Types: logical

More About

collapse all

Version History

Introduced in R2019a