As this is a task to be performed in MATLAB, it cannot be done using JavaScript. Here is the MATLAB code that can be used to find the response times of all accurate trials assuming that the response times and accuracy of each trial are stored in two separate arrays response_times
and accurate_trials
:
main.m265 chars9 lines
Here, idx_accurate_trials
is a logical array with 1
representing the indices of accurate trials and 0
representing the indices of inaccurate trials. The response_times_accurate
array contains only the response times of accurate trials. The disp()
function is used to display the response times. You can customize this code according to the format of your data.
gistlibby LogSnag