title: How to check if a file exists in Matlab?
body: <pre><code>if exist('JaccardDistance', 'file')==1
      load('JaccardDistance');
  else
      % Do things
  end
  </code></pre>
  
  <p>The file JaccardDistance is in the same folder where this code is being executed. The problem is that the "else" part is always being executed, which means that it is not recognizing that the file JaccardDistance exists. What am I doing wrong? Thanks in advance.</p>