cdflib.setVarInitialRecs
변수에 쓸 초기 레코드 수 지정
구문
cdflib.setVarInitialRecs(cdfId,varNum,numrecs)
설명
cdflib.setVarInitialRecs(cdfId,varNum,numrecs)
는 CDF(Common Data Format) 파일의 변수에 작성할 레코드의 초기 개수를 지정합니다.
입력 인수
|
CDF 파일 ID로, |
|
파일의 변수를 식별하는 숫자형 값입니다. 변수 번호는 0부터 시작합니다. |
|
쓸 레코드의 개수를 지정하는 숫자형 값입니다. |
예제
CDF를 만들고 변수를 만든 다음 해당 변수에 대해 쓸 레코드의 개수를 지정합니다. 이 예제를 실행하려면 폴더 쓰기가 가능해야 합니다.
cdfId = cdflib.create("your_file.cdf"); % Create a variable in the file varNum = cdflib.createVar(cdfId,"Grades","cdf_int1",1,[],true,[]); % Check number of records to write for the variable recsWritten = cdflib.getVarNumRecsWritten(cdfId,varNum)
recsWritten = 0
% Specify new number of records to write for the variable cdflib.setVarInitialRecs(cdfId,varNum,100); % Check new number of records to write for the variable recsWritten = cdflib.getVarNumRecsWritten(cdfId,varNum)
recsWritten = 100
%Clean up cdflib.delete(cdfId) clear cdfId
참고 문헌
이 함수는 CDF 라이브러리 C API 루틴 CDFsetzVarInitialRecs
에 대응합니다.
이 함수를 사용하려면 CDF C 인터페이스를 잘 알고 있어야 합니다. CDF 웹사이트에서 CDF 문서에 액세스할 수 있습니다.