Main Content

matlab.io.fits.readKeyLongStr

Read keyword as long string value

Syntax

[value,comment] = readKeyLongStr(fptr,keyname)

Description

[value,comment] = readKeyLongStr(fptr,keyname) returns the specified long string value and comment as character vectors.

This function corresponds to the fits_read_key_longstr (ffgkls) function in the CFITSIO library C API.

Examples

import matlab.io.*
idata = repmat(char(97:106),1,10);
fptr = fits.createFile('myfile.fits');
fits.createImg(fptr,'byte_img',[100 200]);
fits.writeKey(fptr,'mykey',idata);
odata1 = fits.readKey(fptr,'mykey');
odata2 = fits.readKeyLongStr(fptr,'mykey');
fits.closeFile(fptr);

See Also