Using Files from File Exchange

39 次查看(过去 30 天)
J Shaw
J Shaw 2011-11-19
Hi All! I'm a bit new to Matlab, so sorry for the question. Anyway, I found a file in the File Exchange that I would like to use. Where do I need to download it to, and how do I use it once its downloaded?
Thanks in Advance!

回答(2 个)

Image Analyst
Image Analyst 2011-11-19
There's a big blue button on the upper right of the page. Click it and save it to any folder you want. You might want to create a new folder just for that File Exchange entry. Then in MATLAB, set the current folder to wherever you downloaded it to and open the file in the editor and see what is says to do. The well written files will have some usage examples at the beginning of the m-file.
  2 个评论
Jan
Jan 2011-11-19
Instead of setting the current folder, you can use the functions "pathtool" or "addpath" to add the parent folder of the downloaded function to Matlab's searchpath. See in "help addpath" and "help path" for further descriptions.
Image Analyst
Image Analyst 2011-11-19
Yeah, you can do that too. I just like to have the list of files that are in the folder of the file I'm working on off to the left. If you don't then if you don't specify the full path and you save something you'll end up saving to a folder that is not where your file is, which can be confusing so I don't do that. I always specify the full path, as suggested in the FAQ: http://matlab.wikia.com/wiki/FAQ#Where_did_my_file_go.3F_The_risks_of_using_the_cd_function. so that problem wouldn't apply to me but I can see that novices who never pay attention to the folder where things get stored could be confused by it.

请先登录,再进行评论。


Scragmore
Scragmore 2011-11-19
Whats the file you have found? Would help with providing an Ans for you.
AD

类别

Help CenterFile Exchange 中查找有关 Search Path 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by