Stuart’s MATLAB Videos

Watch and Learn

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.

Features covered in this code-along style video include:

Play the video in full screen mode for a better viewing experience. 

|
  • print

评论

要发表评论,请点击 此处 登录到您的 MathWorks 帐户或创建一个新帐户。