| Contents | Index |
cdflib.putVarRecordData(cdfId,varNum,recNum,recordData)
cdflib.putVarRecordData(cdfId,varNum,recNum,recordData) writes data to a record in a variable in a Common Data Format (CDF) file.
Create a CDF, create a variable, and write an entire record of data to 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,'Grades','cdf_int1',1,[],true,[]);
% Write some data to the variable
cdflib.putVarRecordData(cdfid,varNum,0,int8(98))
% Read the value from the variable.
datum = cdflib.getVarData(cdfid,varNum,0)
datum =
98
%Clean up
cdflib.delete(cdfid);
clear cdfidThis function corresponds to the CDF library C API routine CDFputzVarRecordData. 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.
cdflib.getVarRecordData | cdflib.hyperPutVarData | cdflib.putVarData
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |