diff --git a/examples/PS4000A_ID_Block_Adv_Trigger_PWQ_Example.m b/examples/PS4000A_ID_Block_Adv_Trigger_PWQ_Example.m index 3a59401..79411b1 100644 --- a/examples/PS4000A_ID_Block_Adv_Trigger_PWQ_Example.m +++ b/examples/PS4000A_ID_Block_Adv_Trigger_PWQ_Example.m @@ -322,8 +322,9 @@ ylim(axes1, [(-1 * chAInputRange) chAInputRange]); % Plot the trigger position +numPreTriggerSamples = get(ps4000aDeviceObj, 'numPreTriggerSamples'); hold(axes1, 'on'); -triggerPosn = (numSamples)/2 + 1; +triggerPosn = numPreTriggerSamples + 1; plot(axes1, timeMs(triggerPosn), chA(triggerPosn), 'rx'); title(axes1, 'Block Data Acquisition');