Error with Calling "dcmecef2ned" in Simulink
16 views (last 30 days)
Show older comments
I am trying to run a Simulink model I initially created with Matlab 2022b on 2024b. I get the following error when I try to run the code.
"Function 'dcmecef2ned' not supported for code generation."
It use to work, but now it does not on 2024b. Is there a fix for this?
0 Comments
Answers (1)
Paul
on 19 Nov 2025 at 17:54
Hi Richard,
In which version did it used to work? I'm assuming you're calling dcmecef2ned from inside a MatlabFunction block?
4 Comments
Paul
on 3 Dec 2025 at 21:16
Seeing same issue with code not being generated on R2024A.
If you want to use the toolbox function, then you need to declare it in the Matlab Function block using coder.extrinsic and preallocate the output. Might slow down the runtime, but you might not notice. Something like this:
function y = fcn(u)
coder.extrinsic('dcmecef2ned');
y = zeros(3,3);
y = dcmecef2ned(u(1),u(2));
end
See Also
Categories
Find more on Aerospace Applications in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!