nc_convert_unitsΒΆ
nc_convert_units convert the channel units to SI units or common units.
-
bool = nc_convert_units(ssFilename, bSIUnits)
-
bool = nc_convert_units(ncid, bSIUnits)
Return Value
bool is TRUE (1) if the units could be converted and otherwise FALSE (0).
Parameters
-
ssFilename
ssFilename is the file name of a UniPlot data file (.nc2).
-
ncid
ncid is the id of a UniPlot data file (see nc_open or nc_create). Use nc_close to close the file. Instead of ncid the file name ssFilename can be used.
-
bSIUnits
If bSIUnits is TRUE, the channels will be converted to SI units. If FALSE (0) the channels will be converted to commond units.
Comment
Only units that are specified in unit table can be converted. To convert from SI units to common units, the channel name with the common unit must be specified the the channel sheet of the unit table. If the channel is not specified the preferred unit is used if specified. If the unit is not found in the unit table the channel will not be converted. See Unit Converter.
Example
* ssFile = auto_ImportData(GetRootDirectory() + "samples/test1.xls")
* nc_convert_units(ssFile, TRUE);
History
Version | Description |
---|---|
R2013.11 | New. |
id-1039787