Matlab help. How to add a file into matlab?

101 ビュー (過去 30 日間)
lim -
lim - 2015 年 1 月 21 日
コメント済み: Thorsten 2015 年 1 月 21 日
Wanted to use this file for matlab, but dont know how to use it. http://www.mathworks.com/matlabcentral/fileexchange/5104-toolbox-wavelets
How do I add it? Where in the folder do i place it? How to load it or something, etc.

採用された回答

Thorsten
Thorsten 2015 年 1 月 21 日
The quick way is to find out current directory (the Present Working Directory)
pwd
and copy the file to this folder.
If you like to keep the downloaded function(s) separated from your mfiles, which is always a good idea, you can create a folder somewhere on your system, e.g.,
/Users/Lim/FilesFromMatlabCentral
and add this folder to Matlab's search path
addpath('/Users/Lim/FilesFromMatlabCentral')
If you download a whole package with lot's of files that are all in one directory, say, "Awesomefunctions" you have to add this directory
addpath('/Users/Lim/FilesFromMatlabCentral/Awesomefunctions')
If the the Awesomefunctions contains itself some subfolders, you use
addpath(genpath('/Users/Lim/FilesFromMatlabCentral/Awesomefunctions'))
If you want to permanently add this path for future sessions of Matlab, use
savepath
If you more into clicking than typing, just use File -> Set Path ... -> Add Folder (or Add with Subfolders) and then Save the path.

その他の回答 (1 件)

Geoff Hayes
Geoff Hayes 2015 年 1 月 21 日
Lim - create a folder within your MATLAB search path, download the files, and copy them into this folder. Then add this folder and all sub-directories (if any exist) to the search path.
  2 件のコメント
lim -
lim - 2015 年 1 月 21 日
how do you add all the items in the sub-directories into the search path?
Thorsten
Thorsten 2015 年 1 月 21 日
See my answer below.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeSearch Path についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by