MATLAB: What are the extra subdirectories returned by dir function

dirMATLAB

When using the dir function, the first two elements returned have name field values of '.' and '..', which are determined to be directories by the dir function. However, these directories are not created nor do they appear in the directory window. Where do these directories come from?

Best Answer

If you do
>> cd ..
and
>> cd .
you will see that they are aliases for the parent folder and the current folder, respectively.