Determine whether input is folder
tf = isdir('A')
tf = isdir('A') returns logical 1 (true) if A is a folder. Otherwise, it returns logical 0 (false).
1
true
A
0
false
Run:
tf=isdir('myfiles/results')
MATLAB® returns
tf = 1
indicating that myfiles/results is a folder.
myfiles/results
dir | is*
dir
is*