MATLAB Answers

matlab on my desktop does not find a function in the path?

7 views (last 30 days)
Eric Pleace
Eric Pleace on 19 Jan 2019
Commented: Eric Pleace on 21 Jan 2019
I've installed the same version on my desktop and my laptop (R2019b 64bit win64, student) - the laptop version works fine, the desktop version works mostly but does not recognize some functions (eg 'zvect' in a toolbox 'spfirst' for my electronics course) that are clearly in the path. Both paths look identical.
Any suggestion for a fix?


Image Analyst
Image Analyst on 19 Jan 2019
What are the two paths you refer to? One is the search path, which is actually a long collection of a bunch of folders. But what is the other path that is "clearly in the path.", meaning, I guess "clearly in the search path".
What do you get when you type this in the command window?
>> which -all zvect
>> path
Also see Star's suggestion below in case your default path got messed up and your class's toolbox was put into one of the built-in toolbox folders.
What is the path for zvect that you get from using the operating system (rather than MATLAB) to locate the file? Where does it actually truly live?
Also, no one, except at the Mathworks, has R2019b. What is your REAL version? You chose not to list it in the "Release" field when you were filling out your question, for some reason. Edit it to add that.
Eric Pleace
Eric Pleace on 21 Jan 2019
Thanks for all the comments/suggestions,
Yes, the release should have read R2018b.
I ran: "rehash toolboxcache" and vrect is now found and works as expected.

Sign in to comment.

Accepted Answer

Star Strider
Star Strider on 19 Jan 2019
My first suggestion for such problems is to run these from a script or from the Command Window:
rehash toolboxcache
If that fails to solve your problem, use the Contact Us link in the upper right corner of this page to request MathWorks Technical Support.


Eric Pleace
Eric Pleace on 21 Jan 2019
Yes, my version is R2018b (not R2019b as I said).
I tried "which -all zvect" and got " 'zvect' not found. "
I did not try "restoredefaultpath" for fear it would take out my additions to the path for spfirst, but the
rehash toolboxcache
was a winner - problem solved - thank you very much.
Now back to my homework.

Sign in to comment.

More Answers (0)

Sign in to answer this question.