Main Content


Check if node ID exists in factor graph

Since R2022a


nodeExist = hasNode(graph,nodeID) checks if a node with the specified ID nodeID exists in the factor graph graph.

Input Arguments

collapse all

Factor graph, specified as a factorGraph object.

ID of node to check, specified as a nonnegative integer.

Output Arguments

collapse all

Node exists in the factor graph, returned as a logical 0 (false) or 1 (true). The function returns 0 if the node does not exist, and 1 if it does exist.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Version History

Introduced in R2022a

See Also