How do I get the MATLAB current directory in mex code?
4 ビュー (過去 30 日間)
古いコメントを表示
In matlab it would be pwd, but in mex code, how would I find out?
0 件のコメント
回答 (1 件)
Jan
2015 年 1 月 30 日
編集済み: Jan
2015 年 1 月 30 日
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.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で MATLAB Compiler についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!