This figure illustrates MATLAB writing a string to an output buffer. In the output buffer bytes used during write are shaded, and bytes unused during write are unshaded.