function data = loaddata(directory,filetype)
%LOADDATA queries the user for a choice of files to load from a given directory
%   directory = directory you want to get a file from
%   filetype = extenstion of the file you are looking for (default: .mat)

if nargin < 2
    filetype = [];
end

fid = queryfid(directory,filetype);

disp(strcat(['Attempting to load ' fid]));
x = load(fid);

data = x.data;


end

