Sign up Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
yzeyang

Junior Member
Registered:
Posts: 12
Reply with quote  #1 
Hi Jaewon,

Under the ButtonTracker adapter, it is recording the time of last data acquisition with the following code under the "acquire" function

obj.LastSamplePosition=(floor(p.trialtime()-size(data,1)))*ones(1,obj.nButton);


Could you clarify the reasons for 1) taking the floor() and 2) subtracting "size(data,1)"?

Many thanks in advance!

0
Jaewon

Administrator
Registered:
Posts: 727
Reply with quote  #2 
It is a dummy value for trial replay. It is not recording anything.
0
yzeyang

Junior Member
Registered:
Posts: 12
Reply with quote  #3 
Quote:
Originally Posted by Jaewon
It is a dummy value for trial replay. It is not recording anything.


Thanks Jaewon. Now I understand LastSamplePosition is for replay purpose, do you know the purpose of "-size(data,1)"? 
0
Jaewon

Administrator
Registered:
Posts: 727
Reply with quote  #4 
No, during trials, LastSamplePosition has the total number of samples acquired before current reading. The line you picked up is for the trial replay. I can't explain all the code line by line.
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.