Simulink: Error getting properties from an Extrinsic function
이전 댓글 표시
I am running a function in simulink simulation mode in a matlab block that contains factorGraph as an extrinsic function(code below).
[NumNodes, NumFactors] = SLAM();
function [NumNodes, NumFactors] = SLAM()
coder.extrinsic('factorGraph','addFactor','factorTwoPoseSE2');
G = factorGraph;
fctr = factorTwoPoseSE2([1 2], Measurement=[0 0 0]);
addFactor(G,fctr);
NumNodes = double(0.0); %#ok<NASGU>
NumFactors = double(0.0); %#ok<NASGU>
NumNodes = G.NumNodes;
NumFactors = G.NumFactors;
end
However I can't extract the properties of the factorGraph and get the following error (It works without issue in matlab):
Attempt to extract field 'NumNodes' from 'mxArray'.
Attempt to extract field 'NumFactors' from 'mxArray'.
I found:
and
To be relevent but their advice did not result in success.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Tracking and Sensor Fusion에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!