필터 지우기
필터 지우기

Alternatives for functions not supported for code generation

조회 수: 8 (최근 30일)
Hi All,
I am using MATLAB coder to generate C code from MATLAB code files.
Some functions are not supported for code generations
e.g.
fullfile
dir
pwd
cell2mat
strcat
successors
Suggestions on alternate options for the above-mentioned functions would be of great help.

채택된 답변

Walter Roberson
Walter Roberson 2023년 10월 4일
The following are supported for code generation in R2023b:
Still not supported:
  • dir
  • incidence
dir() is a tricky one, as MATLAB Coder is designed to be able to target systems that do not have file systems.
incidence is something that could be programmed yourself with (for example) accumarray (if a "full" matrix is acceptable) or using sparse if you need a sparse version.
I would suggest to you that it would be easier if you were to upgrade to R2023b. Otherwise you are going to need to call coder.ceval
  댓글 수: 4
Deepa Maheshvare
Deepa Maheshvare 2023년 10월 4일
편집: Walter Roberson 2023년 10월 4일
If I may ask one more question,
I'm generating the C++ code using MATLAB coder to use the generated code in OpenCL. I would like to ask for your suggestions for understanding if this is the right way forward : i.e. MATLAB > C++ > OpenCL.
I came across a package such as MatCL ( https://github.com/philipheinisch/MatCL ). But since the interface is not maintained and not well documented, I wasn't sure if I can use that.
Walter Roberson
Walter Roberson 2023년 10월 4일
Sorry, I have not worked with OpenCL.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by