cdflib.setVarBlockingFactor
指定变量的分块因子
语法
cdflib.setVarBlockingFactor(cdfId,varNum,blockingFactor)
说明
cdflib.setVarBlockingFactor(cdfId,varNum,blockingFactor)
指定常用数据格式 (CDF) 文件中的变量的分块因子。
输入参数
|
CDF 文件的标识符,通过调用 |
|
标识文件中的变量的数值。变量编号从 0 开始。 |
|
指定当写入未分配的记录时要分配的记录数的数值。 |
示例
创建一个 CDF 文件,在该 CDF 文件中创建一个变量,然后设置用于该变量的分块因子。要运行此示例,当前必须位于可写文件夹中。
cdfId = cdflib.create("your_file.cdf"); % Create a variable in the file varNum = cdflib.createVar(cdfId,"Time","cdf_int1",1,[],true,[]); % Get the current blocking factor used with the variable bFactor = cdflib.getVarBlockingFactor(cdfId,varNum)
bFactor = 0
% Change the blocking factor for the variable cdflib.setVarBlockingFactor(cdfId,varNum,10); % Check the new blocking factor bFactor = cdflib.getVarBlockingFactor(cdfId,varNum)
bFactor = 10
%Clean up cdflib.delete(cdfId) clear cdfId