can you delete path(mfiles)?

6 次查看(过去 30 天)
lauren
lauren 2014-9-22
回答: Adam 2014-9-22
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?

回答(2 个)

Matt J
Matt J 2014-9-22
编辑:Matt J 2014-9-22
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 2014-9-22
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.

类别

Help CenterFile Exchange 中查找有关 Help and Support 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by