Category Archives: Matlab

Check if a file is a directory in Matlab, before 2018a

The new Matlab versions starting in 2018 rolled out a functioo called isfolder(filename), which is quite handy. But if you're using a version of Matlab before 2018a, you can still easily accomplish this task with the following code: exist(filename,'dir')==7 How does it work? Here, we are telling the exist function to look for the specified filename, and… Read More »