Newcontvar function – Multichannel Systems NeuroExplorer User Manual
Page 180
5.5.3.12. NewContVar Function
NewContVar Function
Creates a new continuous variable.
Syntax
variableReference NewContVar(doc, frequency, mVmin, mVmax)
Parameters
Parameter
Type
Description
doc
documentReference Reference to the document.
frequency
double
Specifies the sampling frequency of the new
variable (in Hz).
mVmin
double
Minimum of the values of the new variable (in
milliVolts).
mVmax
double
Maximum of the values of the new variable (in
milliVolts).
Returns
Returns a reference to the new variable.
Comments
NeuroExplorer stores the values of continuous variables as scaled 2-byte integers. Specifying
minimum and maximum of the variable values helps to determine the correct scaling factor for the
new variable.
Usage
NexScript
doc = GetActiveDocument()
freq = 1000.
% create new variable in the file
doc.Temp1 = NewContVar(doc, 1000., -500.,500.)
% add the values to the new variable
for i = 1 to 10000
% timestamp
ts = i/freq
% value
value = 500.*sin(ts)
AddContValue(doc.Temp1, ts, value)
end
See Also
Introduction to NexScript Programming
Page 178