Linearcombinationofcontvars function – Multichannel Systems NeuroExplorer User Manual
Page 261

5.5.8.31. LinearCombinationOfContVars Function
LinearCombinationOfContVars Function
Calculates a linear combination of two continuous variables.
Syntax
LinearCombinationOfContVars(doc, resultName, contVar1, coeff1, contVar2, coeff2)
Parameters
Parameter
Type
Description
doc
documentReference Reference to the document.
resultName
string
The name of the result.
contVar1
variableReference
Reference to the first continuous variable.
coeff1
double
Coefficient for the first continuous variable
contVar2
variableReference
Reference to the second continuous variable.
coeff2
double
Coefficient for the second continuous variable
Returns
None
Comments
This function calculates a linear combination of two continuous variables. The values of the resulting
variable are:
contVar1_value*coeff1 + contVar2_value*coeff2
Usage
NexScript
doc = GetActiveDocument()
% calculate average of contVar1 and contVar2
LinearCombinationOfContVars(doc, "average", doc.contVar1, 0.5, doc.contVar2, 0.5)
See Also
Introduction to NexScript Programming
Page 259