Is there a Matlab command that allows the user to choose a directory and can then open all the files in that directory automatically? or is there a way to do it using uigetfile?
Something like this should work (although I haven't tried so it might need debugging) or at least give you an idea of how to go about it.
You could get the path of the directory 'my_dir' using uigetfile.
Code:
% load all *.mat files in the directory contained in the variable my_dir
mydir = '\matlabfiles\myproject';
files = dir([my_dir '\*.mat']);
for count = 1:length(files)
load([mydir files(count)];
end
% might be "load([mydir files{count}]".
% I don't have Matlab on this computer to check if you need
% curly braces or round brackets.