Reads a z or r variable from a file in CDF format.
Syntax
ReadCDFFile(File, VariableNumber [ , XVariableNumber = 0 ])
The syntax of the ReadCDFFile function consists of the following parts:
Part |
Description |
---|---|
File |
String with the path of the CDF file to be read. Permitted data structures are Scalar value. Supported data types are String (file name). If the argument is a list, then the function is executed for each element of the list and the result is also a list. |
VariableNumber |
Number of the variables to be read out of the file. The r variables are numbered from 1 to N (N = number of r variables), z variables are numbered from N+1 to N+M (M = number of z variables). Permitted data structures are Scalar value. All integral data types are permitted. If the argument is a list, then the function is executed for each element of the list and the result is also a list. |
XVariableNumber |
Number of variables to be specified as the X component of the variables specified in the second argument. If the number is greater than 0, a signal will be imported. Otherwise, the variable specified in the second argument will be imported as a scalar value, data series or data matrix. Permitted data structures are Scalar value. All integral data types are permitted. If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated. If this argument is omitted, it will be set to the default value 0 . |
Remarks
The function supports all CDF formats up to and including version 2.7. When importing variables with calendar time values, please note that these are interpreted as local times. Values before 1/1/1970 or after 1/18/2038 will be copied as void. The import supports only variables with up to two dimensions.
Available in
FlexPro View, Basic, Professional, Developer Suite
Examples
ReadCDFFile("c:\\examples\\file.cdf", 1) |
Import the first variable from a CDF file. |
ReadCDFFile("c:\\examples\\file.cdf", 3, 1) |
Import the third variable as a Y component and the first variable as an X component from a CDF file. |