Current Directory for Generated Code

6 visualizzazioni (ultimi 30 giorni)
pwd Doesn't seem to be supported for code generation. How might one get the current directory when deploying code with code generator?

Risposta accettata

Walter Roberson
Walter Roberson il 22 Giu 2022
Modificato: Walter Roberson il 3 Ott 2023
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 Commento
Michael
Michael il 5 Nov 2022
The code for using the getcwd() C function within coder.ceval() can be found in this answer .

Accedi per commentare.

Più risposte (1)

Michael
Michael il 3 Ott 2023
pwd is now supported for code generation for R2023b.

Categorie

Scopri di più su DSP Algorithm Acceleration in Help Center e File Exchange

Prodotti


Release

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by