cdflib.getAttrEntry
変数スコープをもつ属性のエントリの値
構文
value = cdflib.getAttrEntry(cdfId,attrNum,entryNum)
説明
value = cdflib.getAttrEntry(cdfId,attrNum,entryNum) は、CDF (Common Data Format) ファイル内の属性エントリの値を返します。
入力引数
| 関数 |
| 属性を識別する数値。属性番号は 0 ベースです。属性には変数スコープが必要です。 |
| 属性でのエントリを指定する数値。エントリ番号は 0 ベースです。 |
出力引数
| エントリの値。 |
例
例の 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 の Web サイトで参照できます。