cdflib.setVarReservePercent
指定变量的保留百分比
语法
cdflib.setVarReservePercent(cdfId,varNum,percent)
说明
cdflib.setVarReservePercent(cdfId,varNum,percent)
指定常用数据格式 (CDF) 文件中的变量的压缩保留百分比。
输入参数
|
CDF 文件的标识符,通过调用 |
|
标识文件中的变量的数值。变量标识符(变量编号)从 0 开始。 |
|
指定要为经过压缩的变量分配的额外空间量的数值,以百分比表示。您可以指定介于 |
示例
创建一个 CDF 文件,创建一个变量,设置变量的压缩,然后设置变量的保留百分比。要运行此示例,当前必须位于可写文件夹中。
cdfId = cdflib.create("your_file.cdf"); % Create a variable in the file varNum = cdflib.createVar(cdfId,"Time","cdf_int1",1,[],true,[]); % Set the compression of the variable cdflib.setVarCompression(cdfId,varNum,"GZIP_COMPRESSION",8) % Set the compression reserver percentage cdflib.setVarReservePercent(cdfId,varNum,80) %Clean up cdflib.delete(cdfId) clear cdfId