Main Content


Add factor to factor graph


factorID = addFactor(graph,factor) adds a factor object, factor, as a node in the specified factorGraph object graph and returns the factor ID, factorID.

Input Arguments

collapse all

Factor graph to add node to, specified as a factorGraph object.

Factor to add to the factor graph, specified as a valid factor object.

Output Arguments

collapse all

Factor ID of added factor, returned as a nonnegative integer.

Extended Capabilities

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

Version History

Introduced in R2022a