Main Content

cdflib.getAttrgEntry

グローバル属性のエントリの値

構文

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

説明

value = cdflib.getAttrgEntry(cdfId,attrNum,entryNum) は、CDF (Common Data Format) ファイル内のグローバル属性エントリの値を返します。

入力引数

cdfId

関数 cdflib.create または関数 cdflib.open の呼び出しによって返される、CDF ファイル識別子。

attrNum

属性を識別する数値。属性番号は 0 ベースです。属性にはグローバル スコープが必要です。

entryNum

属性でのエントリを指定する数値。エントリ番号は 0 ベースです。

出力引数

Value

エントリの値。

例の CDF を開いて、ファイル内のグローバル属性に関連付けられているエントリの値を取得します。

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

% All of the first three attributes have global scope
attrscope = cdflib.getAttrScope(cdfId,0)
attrscope =

    'GLOBAL_SCOPE'
% Get information about the first entry for global attribute
[dtype,numel] = cdflib.inquireAttrgEntry(cdfId,0,0)
dtype =

    'cdf_char'


numel =

    23
% Get the value of the first entry for this global attribute
value = cdflib.getAttrgEntry(cdfId,0,0)
value =

    'This is a sample entry.'
% Clean up
cdflib.close(cdfId)
clear cdfId

参照

この関数は、CDF ライブラリ C API のルーチン CDFgetAttrgEntry に相当します。

この関数を使用するには、CDF C インターフェイスに関する知識を必要とします。CDF のドキュメンテーションは CDF の Web サイトで参照できます。

バージョン履歴

すべて展開する