Current Directory for Generated Code

3 ビュー (過去 30 日間)
Michael
Michael 2022 年 6 月 22 日
回答済み: Walter Roberson 2022 年 6 月 22 日
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 日
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.
https://stackoverflow.com/questions/298510/how-to-get-the-current-directory-in-a-c-program

その他の回答 (0 件)

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by