matlab.io.fits.deleteRows
테이블에서 행 삭제
구문
deleteRows(fptr,firstrow,nrows)
설명
deleteRows(fptr,firstrow,nrows)
는 ASCII 또는 Binary 테이블에서 행을 삭제합니다.
이 함수는 CFITSIO 라이브러리 C API의 fits_delete_rows (ffdrow)
함수에 대응합니다.
예제
Binary 테이블(두 번째 HDU)에서 두 번째, 세 번째 및 네 번째 행을 삭제합니다.
import matlab.io.* srcFile = fullfile(matlabroot,"toolbox","matlab", ... "demos","tst0012.fits"); copyfile(srcFile,"myfile.fits") fileattrib("myfile.fits","+w") fprintf("Before: ") fitsdisp("myfile.fits",Index=2,Mode="min") fptr = fits.openFile("myfile.fits","readwrite"); fits.movAbsHDU(fptr,2); fits.deleteRows(fptr,2,2) fits.closeFile(fptr) fprintf("After : ") fitsdisp("myfile.fits",Index=2,Mode="min")