Biomech-Sim-Toolbox 1
Toolbox for movement simulation and analysis
|
Function to convert unit of a variables table or simVarTable. More...
Functions | |
function | convertUnit (in varTable, in type, in unitOld, in unitNew, in factor) |
Function to convert unit of a variables table or simVarTable. | |
Function to convert unit of a variables table or simVarTable.
Details: convertUnit()
function convertUnit | ( | in | varTable, |
in | type, | ||
in | unitOld, | ||
in | unitNew, | ||
in | factor | ||
) |
Function to convert unit of a variables table or simVarTable.
The function converts the unit of all available data (sim, mean, var, mean_extra, and var_extra). It will also save unitNew into the column 'unit'.
Usage for a simVarTable:
Usage for a TrackingData object:
varTable | Table: Variables table with at least the columns 'type' and 'unit'. |
type | String: Data type for which the unit should be changed. |
unitOld | String: Old unit of the data which should be replaced. |
unitOld | String: New unit of the data which should be replaced. |
factor | Double: Factor applied to the data for conversion. For variance, we apply factor^2. |
varTable | Table: Variables table with converted units. |