%% Is Input a File
% Check if the input myfile1.txt is a file. A result of 1 indicates that myfile1.txt is a file.

result = isfile('myfile1.txt')

% Create the folder myfolder, then check if myfolder is a file. A result of 0 indicates that myfolder is not a file.

mkdir myfolder;
result = isfile('myfolder')

%
% Check if the inputs myfile1.txt and myfolder are files. A result of [1 0] indicates that myfile1.txt is a file and myfolder is not a file.

result = isfile(["myfile1.txt", "myfolder"])

%
%
%
% Copyright 2012 The MathWorks, Inc.