Current Directory for Generated Code

조회 수: 6 (최근 30일)
Michael
Michael 2022년 6월 22일
편집: Walter Roberson 2023년 10월 3일
pwd Doesn't seem to be supported for code generation. How might one get the current directory when deploying code with code generator?

채택된 답변

Walter Roberson
Walter Roberson 2022년 6월 22일
편집: Walter Roberson 2023년 10월 3일
MATLAB Coder is designed to target embedded systems, so functionality that is not part of the C Standard Library is often not available. DSP and so on often have no file system.
If you are targeting MacOS or Linux then coder.ceval to the appropriate system call. Windows uses a different system call.
  댓글 수: 1
Michael
Michael 2022년 11월 5일
The code for using the getcwd() C function within coder.ceval() can be found in this answer .

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

추가 답변 (1개)

Michael
Michael 2023년 10월 3일
pwd is now supported for code generation for R2023b.

카테고리

Help CenterFile Exchange에서 DSP Algorithm Acceleration에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by