3.3 .dat files and Add Path

Play media comment.

Using addpath to access the cement.dat file is one option. However, adding to many folders to the path means that matlab looks for files in many different places. If there are files with the same name at different places in the path it might be hard to know which file matlab will use.

A better option is often to tell matlab where to look for the file. In the video cement.dat was located in the subfolder data, and we can state this in the load-command:

load('data/cement.dat')

/Johan Lindström