% store grayscale data in flat file (without layout!) binwrite('/Path/to/data/grayscale.bin', lsqueeze(grayscale_image));