Multichannel Systems NeuroExplorer User Manual

Page 140

Advertising
background image

Conditional operators


Operator if has the following syntax:

if logical_expression statements ... end


or

if logical_expression statements ... else statements ...

end


Example

% select a variable if it has at lest one spike

% otherwise, deselect the variable

if GetVarCount(doc, i, "neuron") > 0

SelectVar(doc, i, "neuron")

else

DeselectVar(doc, i, "neuron")

end

Page 138

Advertising