Hello. The matrices are stored in the work space as logical type. In order to save them as images you should convert them in "uint8" type. If you want to see them as black and white images, you should assign False to zero and True to 255. In formula, try to add before imwrite the following command:
They are black white images. Just use imwrite to write to file or imshow to display on screen (and save later). You can find imwrite and imshow in Matlab guide.