Documentation

This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

cdflib.setChecksum

Specify checksum mode

Syntax

cdflib.setChecksum(cdfId,mode)

Description

cdflib.setChecksum(cdfId,mode) specifies the checksum mode of a Common Data Format (CDF) file.

Input Arguments

cdfId

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

mode

One of the following character vectors, or its numeric equivalent.

'MD5_CHECKSUM'Sets file checksum to MD5 checksum.
'NO_CHECKSUM'File does not use a checksum.

To get the numeric equivalent of the constants specified by these character vectors, use cdflib.getConstantValue.

Examples

Create a CDF file and set the checksum mode. To run this example, you must be in a writable folder.

cdfid = cdflib.create('mycdf.cdf');

% Check initial value of checksum.
mode = cdflib.getChecksum(cdfid)

NO_CHECKSUM

cdflib.setChecksum(cdfid,'MD5_CHECKSUM')

% Verify the setting 
mode = cdflib.getChecksum(cdfid)

MD5_CHECKSUM

References

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

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?