marginalizeNode
Marginalize node and related factors from factor graph into marginal factor
Since R2025a
Syntax
Description
generates a marginal factor using the information from the specified node and its related
factors, and then adds the marginal factor to the factor graph. The function also removes
the specified factors and any nodes that, as a result of the marginalization process, become
disconnected from any factors in the factor graph.factorID
= marginalizeNode(fg
,nodeID
)
[___,
additionally returns the node IDs of nodes that were removed along with the specified
node.removedNodeIDs
] = marginalizeNode(fg
,nodeID
)
[___,
additionally returns the factor IDs of nodes that were removed along with the specified
node.removedFactorIDs
] = marginalizeNode(fg
,nodeID
)
Examples
Input Arguments
Output Arguments
Extended Capabilities
Version History
Introduced in R2025a