can you delete path(mfiles)?

4 views (last 30 days)
lauren
lauren on 22 Sep 2014
Answered: Adam on 22 Sep 2014
Is there a way to delete path(mfiles)? I was working on a function and when I was running it I messed something up causing me to close out of the program because it was stuck. When I reopened matlab it wouldn't read my function it kept saying not enough arguments. I just kept thinking I was doing something wrong and then I went to older functions I had made and knew worked and they said the same thing. I looked through my command history to see if I did anything and its said path(mfiles) clear. So did i clear them and could this be whats wrong with the function files?

Answers (2)

Matt J
Matt J on 22 Sep 2014
Edited: Matt J on 22 Sep 2014
It's not clear to me what "its said path(mfiles) clear" means. Look at "doc path" to understand the behavior and possible uses of the path() command. The which() command can be used to see the location of an mfile that MATLAB is trying to call. See "doc which".
To delete folders from your path, there is the rmpath() command. You can also use restoredefaultpath() to set the path back to the factory default.

Adam
Adam on 22 Sep 2014
You can easily see if something is in your path by clicking "Set Path" in the 'Home' Matlab ribbon. That will answer the question of whether the function(s) in question are on your path or not. If they aren't then just add them, if they are then you have some problem unrelated to path.

Categories

Find more on Help and Support in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!