This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

hasConnection

Class: viewSet

Check if a connection exists between two views

Syntax

tf = hasConnection(vSet,viewId1,viewId2)

Description

tf = hasConnection(vSet,viewId1,viewId2) returns true if both views exist and have a connection.

Input Arguments

expand all

viewSet object.

View ID 1 in the viewSet object, specified as an integer.

View ID 2 in the viewSet object, specified as an integer.

Output Arguments

expand all

Validity of view connection, returned as a logical 1 or 0.

Examples

expand all

Create an empty viewSet object.

vSet = viewSet;

Add a pair of views.

vSet = addView(vSet,1);
vSet = addView(vSet,2);

Add a connection.

vSet = addConnection(vSet,1,2);

Confirm that the connection exists.

tf = hasConnection(vSet,1,2);

Introduced in R2016a