Write physical units string
writeKeyUnit(fptr,keyname,unit)
writeKeyUnit(fptr,keyname,unit)
writes
a physical units string into an existing keyword. fptr
is
created using the fits.createFile
function. keyname
and unit
are
specified as character vectors.
This function corresponds to the fits_write_key_unit
(ffpunt)
function in the CFITSIO library C API.
import matlab.io.* fptr = fits.createFile('myFitsFile.fits'); fits.createImg(fptr,'long_img',[10 20]); fits.writeKey(fptr,'VELOCITY',12.3,'orbital speed'); fits.writeKeyUnit(fptr,'VELOCITY','km/s'); fits.closeFile(fptr);