Jak cię złapią, to znaczy, że oszukiwałeś. Jak nie, to znaczy, że posłużyłeś się odpowiednią taktyką.
The data in that field,
contained in a cell array, represents the entry values for that attribute. 2-221 cdfinfo For VariableAttributes, the attribute data resides in an N-by-2 cell array, where N is the number of variables. The first column of this cell array contains the variable names associated with the entries. The second column contains the entry values. Note Attribute names may not match the names of the attributes in the CDF file exactly. Because attribute names can contain characters that are illegal in MATLAB field names, they may be translated into legal field names. Illegal characters that appear at the beginning of attributes are removed; other illegal characters are replaced with underscores ('_'). If an attribute’s name is modified, the attribute’s internal number is appended to the end of the field name. For example, Variable%Attribute might become Variable_Attribute_013. The Variables Field The Variables field of the returned info structure is an N-by-6 cell array, where N is the number of variables. The six columns of the cell array contain the following information. Column No. Description Return Type 1 Name of the variable String 2 Dimensions of the variable, as returned by Double the size function array 3 Number of records assigned for the variable Double 4 Data type of the variable, as stored in the String CDF file 5 Record and dimension variance settings for String the variable 6 Sparsity of the variable’s records String 2-222 cdfinfo Column 5 - Record and Dimension Variance This is a string indicating either true or false for one or more types of variance in the variable’s values. The single T or F to the left of the slash designates whether values vary by record. The zero or more T or F letters to the right of the slash designate whether values vary at each dimension. Here are some examples. T/ for a scalar variable F/T for a one-dimensional variable T/TFF for a three-dimensional variable Column 6 - Record Sparsity This is a string holding one of three possible values: • 'Full' • 'Sparse (padded)' • 'Sparse (nearest)' Examples info = cdfinfo('example.cdf') info = Filename: 'example.cdf' FileModDate: '29-Jun-1995 05:51:58' FileSize: 230513 Format: 'CDF' FormatVersion: '2.4.8' FileSettings: [1x1 struct] Subfiles: {} Variables: {7x6 cell} GlobalAttributes: [1x1 struct] VariableAttributes: [1x1 struct] info.Variables ans = 'L_gse' [1x2 double] [ 1] 'char' 'F/T' 'Full' 'Status%C1' [1x2 double] [7493] 'uint8' 'T/T' 'Full' 'B_gse%C1' [1x2 double] [7493] 'single' 'T/T' 'Full' 'B_nsigma%C1' [1x2 double] [7493] 'single' 'T/' 'Full' See Also cdfread 2-223 cdfread 2cdfread Purpose Read data from a CDF file Syntax data = cdfread(file) data = cdfread(file, 'records', recnum, ...) data = cdfread(file, 'variables', varnames, ...) data = cdfread(file, 'slices', dimensionvalues, ...) [data, inf0] = cdfread(file, ...) Description data = cdfread(file) reads all of the variables from each record of the Common Data Format (CDF) file specified in the string, file. The function returns a cell array, in which each row contains a record and each column represents a variable. data = cdfread(file, 'records', recnums, ...) reads only those records specified in the vector, recnums. The record numbers are zero-based. The function returns a cell array having length(recnums) number of rows and as many columns as there are variables. data = cdfread(file, 'variables', varnames, ...) reads only those variables specified in the 1-by-N or N-by-1 cell array of strings, varnames. Data is returned in a cell array having length(varnames) number of columns and a row for each record requested. data = cdfread(file, 'slices', dimensionvalues, ...) reads specific values from the records of one variable in the CDF file. The N-by-3 matrix, dimensionvalues, indicates which records are to be read by specifying start, interval, and count parameters for each of the N dimensions of the variable. The start parameter is zero-based.
|
Wątki
|