TotalRewardDisplay

TotalRewardDisplay()

Description

Displays the total amount of liquid reward delivered in the current session.

  • Units are shown in microliters until 1ml is reached, and subsequently in ml.

  • The display is shown here for an example session:

TotalRewardDisplay('init');

Syntax

On first call:

TotalRewardDisplay('init');

On subsequent calls:

TotalRewardDisplay('add', RewardAmount);

Parameters

  • RewardAmount: The amount of reward earned in the current trial

Returns

-None

Example

% This code initializes the Total Reward Display plugin, and updates it on each trial.

RewardAmount = 5;

% Run 1000 trials:

for currentTrial = 1:1000

...Create, send and run state matrix with a state called "Reward", add and save events

if ~isnan(BpodSystem.Data.RawEvents.Trial{currentTrial}.States.Reward(1))

TotalRewardDisplay('add', RewardAmount);

end

end