Importing data from different directories
7 次查看(过去 30 天)
显示 更早的评论
Hi,
I have data saved in several different directories and many often I need to run the same matlab script to make some post-processing. Now my question:
How can I run my script and select the data to import as they belong to different directories?
I have been using uigetfile() but to select files from the current directory only.
Thank you. C. C.
0 个评论
采纳的回答
Walter Roberson
2011-3-28
[filename, pathname] = uigetfile(...);
completename = fullfile(pathname, filename);
Then use completename as the name to open or load.
0 个评论
更多回答(3 个)
Ian
2011-3-28
You could try this FE submission:
This is a GUI application that allows multiple files or directories to be selected and allows you to manage the list (remove files, reorder, etc.) before returning. It has basic filtering as well as regular expression filtering and navigation of the file system is easy. The output is configurable (cell, struct or char arrays). It is written entirely in M and so is platform independent.
0 个评论
Chiara Modenese
2011-3-28
2 个评论
Ian
2011-3-29
Downloading fine here, here is a backup you can try:
https://gist.github.com/raw/892280/8d7368d7d8b35216de5d18917b3c1cf0bb5d37e1/gistfile1.matlab
Chiara Modenese
2011-3-29
2 个评论
Ian
2011-3-30
You need to do what uipickfiles does, read its source and see what you need to do from it. There isn't a simple way to do it in Matlab I think...
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 File Operations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!