function x = readfile(fn)
%READFILE Returns the contents of a file.
%   readfile('enc.txt') returns the contents of the file 'enc.txt' if it
%   exists

fid = fopen(fn, 'r');
if fid == -1,
    disp('readfile: Invalid filename.');
    return
end
x = fread(fid);
x = char(x);
fclose(fid);
