cdflib.getAttrgEntry
グローバル属性のエントリの値
構文
value = cdflib.getAttrgEntry(cdfId,attrNum,entryNum)
説明
value = cdflib.getAttrgEntry(cdfId,attrNum,entryNum)
は、CDF (Common Data Format) ファイル内のグローバル属性エントリの値を返します。
入力引数
|
関数 |
|
属性を識別する数値。属性番号は 0 ベースです。属性にはグローバル スコープが必要です。 |
|
属性でのエントリを指定する数値。エントリ番号は 0 ベースです。 |
出力引数
|
エントリの値。 |
例
例の CDF を開いて、ファイル内のグローバル属性に関連付けられているエントリの値を取得します。
cdfid = cdflib.open('example.cdf'); % Any 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 サイトで参照できます。