cdflib.setVarSparseRecords
변수가 희소 레코드를 처리하는 방법 지정
구문
cdflib.getVarSparseRecords(cdfId,varNum,
stype
)
설명
cdflib.getVarSparseRecords(cdfId,varNum,
은 CDF(Common Data Format) 파일에서 변수의 희소 레코드 유형을 지정합니다.stype
)
입력 인수
|
CDF 파일 ID로, | ||||||||
|
설정할 변수를 식별하는 숫자입니다. 변수 번호는 0부터 시작합니다. | ||||||||
|
변수가 희소 레코드를 처리하는 방법을 지정하며, 다음 문자형 벡터나 string형 스칼라 중 하나이거나 그에 상응하는 숫자입니다.
이러한 값에 상응하는 숫자를 가져오려면 |
예제
다중 파일 CDF를 열고 변수를 닫습니다.
CDF를 만들고 변수를 만든 다음 해당 변수의 희소 레코드 유형을 설정합니다. 이 예제를 실행하려면 폴더 쓰기가 가능해야 합니다.
cdfId = cdflib.create("your_file.cdf"); % Create a variable in the file varNum = cdflib.createVar(cdfId,"Time","cdf_int1",1,[],true,[]); % Check the sparse records type of the variable stype = cdflib.getVarSparseRecords(cdfId,varNum)
stype = 'NO_SPARSERECORDS'
% Set the sparse records type of the variable cdflib.setVarSparseRecords(cdfId,varNum,"PAD_SPARSERECORDS") % Check the new sparse records type of the variable stype = cdflib.getVarSparseRecords(cdfId,varNum)
stype = 'PAD_SPARSERECORDS'
%Clean up cdflib.delete(cdfId) clear cdfId
참고 문헌
이 함수는 CDF 라이브러리 C API 루틴 CDFsetzVarSparseRecords
에 대응합니다.
이 함수를 사용하려면 CDF C 인터페이스를 잘 알고 있어야 합니다. CDF 웹사이트에서 CDF 문서에 액세스할 수 있습니다.