Current Directory for Generated Code

7 次查看(过去 30 天)
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 中查找有关 MATLAB Coder 的更多信息

产品


版本

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by