Main Content

cdflib.getAttrMaxEntry

変数属性の最後のエントリの番号

構文

maxEntry = cdflib.getAttrMaxEntry(cdfId,attrNum)

説明

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

cdfId は CDF ファイルを識別します。

attrNum は、属性を指定する数値です。属性番号は 0 ベースです。属性には変数スコープが必要です。

入力引数

cdfId

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

attrNum

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

出力引数

maxEntry

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

例の CDF を開いて、ファイル内の変数スコープをもつ属性に関連付けられている最後のエントリの番号を取得します。

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

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

    'VARIABLE_SCOPE'
% Get the number of the last entry for this attribute
entrynum = cdflib.getAttrMaxEntry(cdfId,3)
entrynum =

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

参照

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

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