Load files from two different folders
显示 更早的评论
Hi,
I need to upload files from two different folders. I wrote this but it woking just from one folder. How can I add the second folder?
dirname=['D:\Shared\MATLAB\100min\BT']
cd(dirname)
filelist = dir([basename '*_BTlength.mat'])
Thanks
采纳的回答
更多回答(1 个)
Jacob Ward
2023-2-24
0 个投票
Use the addpath() function to add the path to your second folder to the working directory:
类别
在 帮助中心 和 File Exchange 中查找有关 Search Path 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!