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