cdflib.getVarCacheSize
다중 파일(Multifile) 캐시 버퍼의 수
구문
numBuffers = cdflib.getVarCacheSize(cdfId,varNum)
설명
numBuffers = cdflib.getVarCacheSize(cdfId,varNum)
은 CDF(Common Data Format) 파일의 변수에 사용된 캐시 버퍼의 수를 반환합니다.
cdfId
는 CDF 파일을 식별합니다. varNum
은 변수를 식별하는 숫자형 값입니다. 변수 식별자는 0부터 시작합니다.
이 함수는 다중 파일 형식 CDF에만 적용됩니다. 캐싱에 대한 자세한 내용은 CDF User's Guide를 참조하십시오.
예제
다중 파일 CDF를 만들고 변수에 사용 중인 버퍼의 수를 가져옵니다. 이 예제를 실행하려면 폴더 쓰기가 가능해야 합니다.
cdfId = cdflib.create("your_file.cdf"); % Set the format of the file to be multi-file cdflib.setFormat(cdfId,"MULTI_FILE") % Create a variable in the file varNum = cdflib.createVar(cdfId,"Time","cdf_int1",1,[],true,[]); % Note how the library creates a separate file for the variable ls your_file.*
your_file.cdf your_file.z0
% Determine the number of cache buffers used with the variable
numBuf = cdflib.getVarCacheSize(cdfId,varNum)
numBuf = 1
% Clean up cdflib.delete(cdfId) clear cdfId
참고 문헌
이 함수는 CDF 라이브러리 C API 루틴 CDFgetzVarCacheSize
에 대응합니다.
이 함수를 사용하려면 CDF C 인터페이스를 잘 알고 있어야 합니다. CDF 웹사이트에서 CDF 문서에 액세스할 수 있습니다.