I would recommend you output a text file rather than binary from matlab. Reading text is easy in VHDL, but reading binary is simulator dependent. Modelsim is the easiest to read binary in.
The body of the process has to be changed depending on what you are reading and how you are reading. The example just covers a simple file reading and writing application.
if you are using modelsim and want to read binary, you can read 1 character at a time from a file.
Code:
type bin_file_t is file of character;
file my_bin_file : bin_file_t open read_mode is "some_file.bin";
variable buf : character;
variable buf_int : integer;
.....
read(my_bin_file, buf);
buf_int := character'pos(buf);
Modelsim will do this fine and you have full byte access. Other simulators insist you have some obscure file header (ISE Simulator) while others just wont work.