Updated matlab script to output to bin file