give the matlab command to find the response times of all accurate trials. in javascript

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.m
% find the accurate trials
idx_accurate_trials = (accurate_trials == 1);

% extract the response times of accurate trials
response_times_accurate = response_times(idx_accurate_trials);

% display the response times of accurate trials
disp(response_times_accurate);
265 chars
9 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