srcFile = fullfile(matlabroot,'toolbox',...'matlab','demos','tst0012.fits');
copyfile(srcFile,'myfile.fits');
fileattrib('myfile.fits','+w');
fptr = fits.openDiskFile('myfile.fits','readwrite');
fits.writeComment(fptr,'This is just a comment.');
fits.closeFile(fptr);