Hello, I realize this is an older post, but I would like to put another possibility out there for what can be wrong (and a solution):
This is for if you've ensured that the function you're trying to call both exists and is definitely on your path, but MatLab is still throwing this error (as was the case for me).
The folder containing the function I was trying to run was labelled with slightly unusual characters (so that it would appear at the top of the directory where I needed it).
Folder title: "--> title of folder" (the quotes are not part of the folder title)
I finally got the function to run when I moved it into a folder outside of "--> title...", and it ran without a problem. I have a feeling the "-->" characters in the folder title caused the error, which might be related to how MatLab accesses files when looking for the function you called.
Hopefully this is clear enough to understand and helps as an alternative if someone else runs into this.