Main Content

cdflib.getAttrMaxgEntry

グローバル属性の最後のエントリの番号

構文

maxEntry = cdflib.getAttrMaxgEntry(cdfId,attrNum)

説明

maxEntry = cdflib.getAttrMaxgEntry(cdfId,attrNum) は、CDF (Common Data Format) ファイル内のグローバル属性の最後のエントリの番号を返します。

入力引数

cdfId

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

attrNum

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

出力引数

maxEntry

属性の最後のエントリのエントリ番号。エントリ番号は 0 ベースです。

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

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

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

    'GLOBAL_SCOPE'
% Get the number of the last entry for this attribute
entrynum = cdflib.getAttrMaxgEntry(cdfId,0)
entrynum =

     4
% Clean up
cdflib.close(cdfId)
clear cdfId

参照

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

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