title: matlab fails deployment in internal code
body: <p>I want to compile a gui matlab project, but fail because of this error which is not in my code</p>
  
  <pre><code>Subscript indices must either be real positive integers or logicals.
  
  Error in isscript (line 7)
          if strcmpi(pth(end-1:end), '.m') &amp;&amp; exist(pth, 'file') == 2
  
  Error in matlab.depfun.internal.Schema/move/@(setMembers)setMembers(~isscript(setMembers))
  
  
  Error in matlab.depfun.internal.Schema&gt;applyMoveFcn (line 987)
      keptFiles = fcn(fileList);
  
  Error in matlab.depfun.internal.Schema&gt;@(files,destMap)applyMoveFcn(op,files,destMap,destSet,reason,rule) (line 822)
                      @(files, destMap)applyMoveFcn(op, files, destMap, ...
  
  Error in matlab.depfun.internal.Schema/applySetRules (line 141)
                          xformedSet = feval(operations{n}, xformedSet, rMap);
  
  Error in matlab.depfun.internal.Completion/applySetRules (line 1059)
              [modifiedList, rMap] = ...
  
  Error in matlab.depfun.internal.Completion/initializeRootSet (line 1142)
              [addedFiles, ruleFilter, notes] = ...
  
  Error in matlab.depfun.internal.Completion (line 1601)
                  obj.RootSet = initializeRootSet(obj, files);
  
  Error in matlab.depfun.internal.requirements (line 166)
      c = matlab.depfun.internal.Completion(files, tgt);
  
  Error in appcreate.internal.appbuilder.getDependencyList (line 173)
              [dependentfiles, depproducts, ~] = matlab.depfun.internal.requirements(varargin, 'MATLAB');
  </code></pre>
  
  <p>How can I get matlab (2013b) to compile the package?</p>
  
  <p>The code where matlab fails is (which is NOT my code)</p>
  
  <pre><code>function tf = isscript(files)
  % ISSCRIPT Is the file a script file?
  tf = false(1,numel(files));
  for k=1:numel(files)
      pth = files{k};
      % Can't be a script if it isn't an M-file.
      if strcmpi(pth(end-1:end), '.m') &amp;&amp; exist(pth, 'file') == 2 
          mt = matlab.depfun.internal.cacheMtree(pth);
          fcn = mtfind(mt, 'Kind', 'FUNCTION');
          tf(k) = isempty(fcn);
      end
  end
  </code></pre>