When you use
fprintf(b,i);
in MATLAB, because you did not specify a format, the default format used is '%s\n' . Each of your values for i is being converted using char() to become a character, and that is sent and then newline. Note that 1 would convert to char(1), the ASCII SOH (Start of Header) character, the one with binary value 1, not to '1', the digit 1, which is char(49) .
You should be considering using fwrite() instead of fprintf() if you want to send the values as binary, and if you want '1' and '2' and so on to be sent then you should use a format such as
fprintf(b, '%d\n', i)
You might need to adjust the read on the Arduino side.