Error in Matlab2017b coder: the extrinsic function "size" is not available for standalone code generation.

4 ビュー (過去 30 日間)
m-scripting file is executing without errors. While generating the C-code using "Coder", i am getting the errors for the functions "Size" and "xmlread". Erros is attached for reference.
.
  2 件のコメント
Matan Silver
Matan Silver 2023 年 9 月 14 日
Hi Pradeep,
To best investigate some of these errors and help you resolve them, could you provide a short reproduction script that will produce these errors?
I will try to help as much as I can with the information here. Are you explicitly declaring certain functions extrinsic using "coder.extrinsic"? If so, the errors relating to standalone code generation are accurate--standalone code can't use the output of extrinsic functions because that requires calling into MATLAB (and standalone code must work without MATLAB).
Regarding the function "xmlread" which you mentioned--"xmlread" does not support code generation. The development team is aware of this limitation. There are a few workarounds to the lack of support for now:
None of those solutions will read from an xml file, but if you use a different file format for this application, you might be able to use one of those options.
Let me know if you can upload some reproduction examples. Thanks,
Matan
Pradeep Kumar Boggarapu
Pradeep Kumar Boggarapu 2023 年 9 月 20 日
Dear Marthan,
Thank you.
Any supporting documnet which contains the list of unsupported functions for the Matlab coder.
At present, I cannot share the code.
Thank you very much.
With regards,
Pradeep Kumar

サインインしてコメントする。

採用された回答

Denis Gurchenkov
Denis Gurchenkov 2023 年 9 月 26 日
編集済み: Denis Gurchenkov 2023 年 9 月 26 日
size() is supported for code generation, this is one of the basic functions that always works. To understand why the error happens, one needs to see the source code of the example. This is either a bug or some misconfiguration. Maybe you try to call size on the return value of an extrinsic function? If so, read the chapter on extrinsic functions here
As Matan said, xmlread() does not support code generation. You'd need to use coder.ceval to call to some thrid-party xml reading library.
> Any supporting documnet which contains the list of unsupported functions for the Matlab coder.
Documentation for each MathWorks toolbox function has the "extended capabilities" section at the bottom, and if the function supports code generation, that capability is listed there, along with any limitations. If there is no extended capabilities section, then the function does not support code generation.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB Coder についてさらに検索

製品


リリース

R2017b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by