| Contents | Index |
cdflib.setVarPadValue(cdfId,varNum,padvalue)
cdflib.setVarPadValue(cdfId,varNum,padvalue) specifies the pad value used with a variable in a Common Data Format (CDF) file.
Create a CDF, create a variable in the CDF, and then set the pad value used with the variable. To run this example, you must be in a writable folder.
cdfid = cdflib.create('your_file.cdf');
% Create a variable in the file.
varNum = cdflib.createVar(cdfid,'Time','cdf_int1',1,[],true,[]);
% Get the current pad value used with the variable
padval = cdflib.getVarPadValue(cdfid,varNum)
padval =
0
% Change the pad value for the variable
cdflib.setVarPadValue(cdfid,varNum,int8(1));
% Check the new pad value.
padval = cdflib.getVarPadValue(cdfid,varNum)
padval =
1
% Clean up
cdflib.delete(cdfid)
clear cdfidThis function corresponds to the CDF library C API routine CDFsetzVarPadValue. To use these functions, you must be familiar with the CDF C interface. Read the CDF documentation at the CDF Web site. For copyright information, see the cdfcopyright.txt file.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |