Understanding relative paths when running compiled Matlab executable
20 views (last 30 days)
Show older comments
I have an issue which I think is a result of my lack of understanding of how relative paths work in Matlab and I was wondering if someone could help me. Effectively, I have an Matlab executable (.exe) that I want to run from my own code.
Basically my folder structure is the following:
MyProject/
MyCode/
ThirdPartyMatlabModel /
MatlabModel.exe
Data /
The data ingested by the model
If I run MatlabModel.exe from windows explorer everything works fine and the model works.
However when I try to run the executable from the my code I end up with the following error messages.
Error using textscan
Invalid file identifier. Use fopen to generate a valid file identifier.
Error in parseINI
MATLAB:FileIO:InvalidFid
Does Matlab take relative paths from where the EXE is run from?
Does anyone have any suggestions as to how to rectify this issue?
Thank you for any response.
Answers (0)
See Also
Categories
Find more on Software Development Tools in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!