can you delete path(mfiles)?

6 vues (au cours des 30 derniers jours)
lauren
lauren le 22 Sep 2014
Réponse apportée : Adam le 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?

Réponses (2)

Matt J
Matt J le 22 Sep 2014
Modifié(e) : Matt J le 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 le 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.

Catégories

En savoir plus sur Help and Support dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by