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 계정에 로그인하거나 계정을 새로 만드십시오.