stored here for personal use; see http://www.mathworks.com/matlabcentral/fileexchange/10946-readtext for original