write () and fwrite () require the matlab data type to be uint8. For example, if you do fwrite (this.comm, [10 28 10 13]) you are sending a list of four double, each double requires 8 bytes (64 bit) ...