Accessing Files Relative to a MATLAB Project's Root Folder
While trying to troubleshoot another bug, which I couldn’t reproduce, I found something else I want to fix. I have a number of data files in my MATLAB® project subfolders that the code in each subfolder needs to access. Out of habit, I normally run the code from inside the subfolders, but I don’t want to have to do that. So I need to update my code to refer to the data files relative to the project folder, which I will get dynamically.
(Originally posted in Stuart’s Video Blog)
Published: 27 Apr 2022