How do I get the MATLAB current directory in mex code?

답변 (1개)

Jan
Jan 2015년 1월 30일
편집: Jan 2015년 1월 30일

1 개 추천

The current folder inside the MEX file is the same as in Matlab. So you can use the standard C command getcwd to obtain the current directory. A modern version is _getcwd or if you are using the boost libs: current_path(). Under Windows the GetCurrentDirectory is sufficient also and can handle Unicode filenames in addition, but is depends on the platform.

카테고리

도움말 센터File Exchange에서 MATLAB Compiler에 대해 자세히 알아보기

태그

질문:

2015년 1월 30일

편집:

Jan
2015년 1월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by