MATLAB: Can you open a file that is not in your matlab directory with the fopen function

fopenMATLABopening files

From your desktop forexample? Do you have to specify it's location to fopen, the filename alone seems to not be enough.

Best Answer

yo just have to specify the full path:
fid=fopen('C:\users\your_name\Desktop\your_file.txt');