function [data] = load_dataset_from_files(basename, dir)

% datafile_rc(FILE) loads the real and imaginary components of a matrix
%   (from /var/tmp/FILE_r and /var/tmp/FILE_i) and returns the complex matrix.
%
% datafile_rc(FILE, DIR) specifies a directory different from /var/tmp.

if nargin<2,  dir = []; end

data = datafile([ basename '_r' ], dir) + 1i* datafile([ basename '_i' ], dir);
