matlab.io.fits.createFile
创建 FITS 文件
语法
fptr = createFile(filename)
说明
fptr = createFile(filename)
创建 FITS 文件。如果指定文件已存在,将返回错误,除非文件名添加了感叹号 (!) 作为前缀。在这种情况下,CFITSIO 将覆盖(删除)现有的所有同名文件。以字符向量或字符串标量形式指定 filename
。
此函数对应于 CFITSIO 库 C API 中的 fits_create_file (ffinit)
函数。
示例
新建一个 FITS 文件。
import matlab.io.* fptr = fits.createFile('myfile.fits'); fits.createImg(fptr,'uint8',[256 512]); fits.closeFile(fptr); fitsdisp('myfile.fits');