Main Content

cdflib.getAttrEntry

변수 범위 특성 항목의 값

구문

value = cdflib.getAttrEntry(cdfId,attrNum,entryNum)

설명

value = cdflib.getAttrEntry(cdfId,attrNum,entryNum)은 CDF(Common Data Format) 파일에서 특성 항목의 값을 반환합니다.

입력 인수

cdfId

CDF 파일 ID로, cdflib.create 또는 cdflib.open 호출에서 반환됩니다.

attrNum

특성을 식별하는 숫자형 값입니다. 특성 번호는 0부터 시작합니다. 특성은 변수 범위여야 합니다.

entryNum

특성 항목을 지정하는 숫자형 값입니다. 항목 번호는 0부터 시작합니다.

출력 인수

Value

항목의 값입니다.

예제

예제 CDF를 열고 해당 파일에서 변수 범위 특성에 대한 항목의 값을 가져옵니다.

cdfId = cdflib.open("example.cdf");

% The fourth attribute is of variable scope
attrscope = cdflib.getAttrScope(cdfId,3)
attrscope =

    'VARIABLE_SCOPE'
% Get information about the first entry for this attribute
[dtype,numel] = cdflib.inquireAttrEntry(cdfId,3,0)
dtype =

    'cdf_char'


numel =

    10
% Get the value of the entry for this attribute
% Note that it is a character vector of length 10
value = cdflib.getAttrEntry(cdfId,3,0)
value =

    'Time value'
% Clean up
cdflib.close(cdfId)
clear cdfId

참고 문헌

이 함수는 CDF 라이브러리 C API 루틴 CDFgetAttrzEntry에 대응합니다.

이 함수를 사용하려면 CDF C 인터페이스를 잘 알고 있어야 합니다. CDF 웹사이트에서 CDF 문서에 액세스할 수 있습니다.

버전 내역

모두 확장