Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

라이선스가 부여된 사용자만 번역 문서를 볼 수 있습니다. 번역 문서를 보려면 로그인하십시오.

cdflib.setVarPadValue

Specify pad value used with variable

Syntax

cdflib.setVarPadValue(cdfId,varNum,padvalue)

Description

cdflib.setVarPadValue(cdfId,varNum,padvalue) specifies the pad value used with a variable in a Common Data Format (CDF) file.

Input Arguments

cdfId

Identifier of a CDF file, returned by a call to cdflib.create or cdflib.open.

varNum

Numeric value identifying a variable in the file. Variable numbers are zero-based.

padValue

Value to use a pad value for the variable. The data type of the pad value must match the data type of the variable.

Examples

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 cdfid

Related Examples

References

This function corresponds to the CDF library C API routine CDFsetzVarPadValue.

To use this function, you must be familiar with the CDF C interface. Read the CDF documentation at the CDF website.

For copyright information, see the cdfcopyright.txt file.

Was this topic helpful?