주요 콘텐츠

matlab.io.fits.deleteRecord

레코드 번호(Record Number)를 기준으로 키 삭제

구문

deleteRecord(fptr,keynum)

설명

deleteRecord(fptr,keynum)은 레코드 번호를 기준으로 키워드를 삭제합니다.

이 함수는 CFITSIO 라이브러리 C API의 fits_delete_record (ffdrec) 함수에 대응합니다.

예제

주 배열(Primary Array)에서 18번째 키워드("ORIGIN")를 삭제합니다.

import matlab.io.*
srcFile = fullfile(matlabroot,"toolbox","matlab", ...
                   "demos","tst0012.fits");
copyfile(srcFile,"myfile.fits")
fileattrib("myfile.fits","+w")
fptr = fits.openFile("myfile.fits","readwrite");
card = fits.readRecord(fptr,18);
fits.deleteRecord(fptr,18)
fits.closeFile(fptr)

참고 항목

|