MATLAB ヘルプ センター
Copy factor graph
Since R2026a
copyfg = copy(fg)
copyfg = copy(fg) creates a deep copy of the specified factor graph with the same properties.
copyfg
fg
example
collapse all
Create factor graph and add factors to the graph.
fg = factorGraph; ids = generateNodeID(fg,5,"factorTwoPoseSE2"); poseFactors = factorTwoPoseSE2(ids,Measurement=repmat([1 0 0],5,1)); addFactor(fg,poseFactors);
Optimize factor graph and get the node states.
optimize(fg); stateFG = nodeState(fg,unique(ids))
stateFG = 6×3 -2.5000 0 0 -1.5000 0 0 -0.5000 0 0 0.5000 0 0 1.5000 0 0 2.5000 0 0
Create a deep copy of the factor graph and display the node states of the factor graph copy.
fgCopy = copy(fg); stateFGCopy = nodeState(fg,unique(ids))
stateFGCopy = 6×3 -2.5000 0 0 -1.5000 0 0 -0.5000 0 0 0.5000 0 0 1.5000 0 0 2.5000 0 0
factorGraph
Factor graph, specified as a factorGraph object.
Factor graph, returned as a factorGraph object. This copies all property values, node states, factors, and calculated covariances from fg.
expand all
Introduced in R2026a
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
ヨーロッパ
アジア太平洋地域
最寄りの営業オフィスへのお問い合わせ