Main Content

File CDF

Formato di dati comune

Formato di dati comune (CDF) è un formato di dati autodescrittivo per la memorizzazione di dati scalari e multidimensionali in modo indipendente dalla piattaforma e dalla disciplina. È possibile interagire con i file CDF in due modi:

  • Le funzioni CDF di alto livello di MATLAB® forniscono un'interfaccia programmatica semplificata per la lettura dei dati dai file CDF.

  • Le funzioni CDF di basso livello di MATLAB forniscono un controllo più preciso sul processo di lettura e scrittura dei file CDF, dando accesso a più di 90 funzioni della libreria C di CDF. Per esportare i dati in un file CDF, è necessario utilizzare le funzioni di basso livello. Per utilizzare queste funzioni in MATLAB, anteporre al nome della funzione il percorso dello spazio nome di cdflib. Ad esempio:

    cdfid = cdflib.open("example.cdf");
    

    Per utilizzare le funzioni CDF di basso livello di MATLAB, è necessario conoscere i concetti di programmazione dell'API C di CDF, descritti in https://cdf.gsfc.nasa.gov/.

MATLAB utilizza la versione della libreria C di CDF 3.8.1.

Funzioni

espandi tutto

cdfinfoInformation about Common Data Format (CDF) file
cdfreadRead data from Common Data Format (CDF) file

Informazioni sulla libreria

cdflib.getConstantNamesNames of Common Data Format (CDF) library constants
cdflib.getConstantValueNumeric value corresponding to Common Data Format (CDF) library constant
cdflib.getFileBackwardReturn backward compatibility mode
cdflib.getLibraryCopyrightCopyright notice of Common Data Format (CDF) library
cdflib.getLibraryVersionLibrary version and release information
cdflib.getValidateLibrary validation mode
cdflib.setFileBackwardSpecify backward compatibility mode
cdflib.setValidateSpecify library validation mode

Operazioni sui file

cdflib.closeClose Common Data Format (CDF) file
cdflib.deleteDelete Common Data Format (CDF) file
cdflib.openOpen Common Data Format (CDF) file

Operazioni di lettura dei file

cdflib.getCacheSizeNumber of cache buffers
cdflib.getChecksumChecksum mode
cdflib.getCompressionCompression settings
cdflib.getCompressionCacheSizeNumber of compression cache buffers
cdflib.getCopyrightCopyright notice in Common Data Format (CDF) file
cdflib.getFormatFormat of Common Data Format (CDF) file
cdflib.getMajorityMajority of variables
cdflib.getNameName of Common Data Format (CDF) file
cdflib.getReadOnlyModeRead-only mode
cdflib.getStageCacheSizeNumber of cache buffers for staging
cdflib.getVersionCommon Data Format (CDF) library version and release information
cdflib.inquireInformation about Common Data Format (CDF) file

Operazioni di scrittura dei file

cdflib.createCreate Common Data Format (CDF) file
cdflib.setCacheSizeSpecify number of dotCDF cache buffers
cdflib.setChecksumSpecify checksum mode
cdflib.setCompressionSpecify compression settings
cdflib.setCompressionCacheSizeSpecify number of compression cache buffers
cdflib.setFormatSpecify format of Common Data Format (CDF) file
cdflib.setMajoritySpecify majority of variables
cdflib.setReadOnlyModeSpecify read-only mode
cdflib.setStageCacheSizeSpecify number of staging cache buffers for Common Data Format (CDF) file

Lettura delle variabili

cdflib.getVarAllocRecordsNumber of records allocated for variable
cdflib.getVarBlockingFactorBlocking factor for variable
cdflib.getVarCacheSizeNumber of multifile cache buffers
cdflib.getVarCompressionInformation about compression used by variable
cdflib.getVarDataSingle value from record in variable
cdflib.getVarMaxAllocRecNumMaximum allocated record number for variable
cdflib.getVarMaxWrittenRecNumMaximum written record number for variable
cdflib.getVarNameVariable name, given variable number
cdflib.getVarNumVariable number, given variable name
cdflib.getVarNumRecsWrittenNumber of records written to variable
cdflib.getVarPadValuePad value for variable
cdflib.getVarRecordDataEntire record for variable
cdflib.getVarReservePercentCompression reserve percentage for variable
cdflib.getVarsMaxWrittenRecNumMaximum written record number for CDF file
cdflib.getVarSparseRecordsInformation about how variable handles sparse records
cdflib.hyperGetVarDataRead hyperslab of data from variable
cdflib.inquireVarInformation about variable

Scrittura delle variabili

cdflib.closeVarClose specified variable from multifile format Common Data Format (CDF) file
cdflib.createVarCreate new variable
cdflib.deleteVarDelete variable
cdflib.deleteVarRecordsDelete range of records from variable
cdflib.hyperPutVarDataWrite hyperslab of data to variable
cdflib.putVarDataWrite single value to variable
cdflib.putVarRecordDataWrite entire record to variable
cdflib.renameVarChange name of variable
cdflib.setVarAllocBlockRecordsSpecify range of records to be allocated for variable
cdflib.setVarBlockingFactorSpecify blocking factor for variable
cdflib.setVarCacheSizeSpecify number of multifile cache buffers for variable
cdflib.setVarCompressionSpecify compression settings used with variable
cdflib.setVarInitialRecsSpecify initial number of records written to variable
cdflib.setVarPadValueSpecify pad value used with variable
cdflib.setVarReservePercentSpecify reserve percentage for variable
cdflib.setVarsCacheSizeSpecify number of cache buffers used for all variables
cdflib.setVarSparseRecordsSpecify how variable handles sparse records

Lettura degli attributi

cdflib.getAttrEntryValue of entry in attribute with variable scope
cdflib.getAttrgEntryValue of entry in global attribute
cdflib.getAttrMaxEntryNumber of last entry for variable attribute
cdflib.getAttrMaxgEntryNumber of last entry for global attribute
cdflib.getAttrNameAttribute name, given attribute number
cdflib.getAttrNumAttribute number, given attribute name
cdflib.getAttrScopeScope of attribute
cdflib.getNumAttrEntriesNumber of entries for attribute with variable scope
cdflib.getNumAttrgEntriesNumber of entries for attribute with global scope
cdflib.getNumAttributesNumber of attributes with variable scope
cdflib.getNumgAttributesNumber of attributes with global scope
cdflib.inquireAttrInformation about attribute
cdflib.inquireAttrEntryInformation about entry in attribute with variable scope
cdflib.inquireAttrgEntryInformation about entry in attribute with global scope

Scrittura degli attributi

cdflib.createAttrCreate attribute
cdflib.deleteAttrDelete attribute
cdflib.deleteAttrEntryDelete entry from attribute with variable scope
cdflib.deleteAttrgEntryDelete entry from attribute with global scope
cdflib.putAttrEntryWrite value to entry in attribute with variable scope
cdflib.putAttrgEntryWrite value to entry in attribute with global scope
cdflib.renameAttrChange name of attribute

Funzioni di utilità

cdflib.breakdownTT2000Convert CDF_TIME_TT2000 timestamp to time components (Da R2022b)
cdflib.computeEpochConvert time value to CDF_EPOCH value
cdflib.computeEpoch16Convert time value to CDF_EPOCH16 value
cdflib.computeTT2000Convert time components to CDF_TIME_TT2000 timestamp (Da R2022b)
cdflib.epoch16BreakdownConvert CDF_EPOCH16 value to time value
cdflib.epochBreakdownConvert CDF_EPOCH value to time value

Argomenti

Informazioni complementari