To calculate the mean response times for each trial in Matlab, we can use the mean()
function along the rows of the matrix.
Here's how to do it:
main.m296 chars9 lines
This will output a column vector containing the mean response time for each trial, as follows:
main.m20 chars5 lines
Note that we've used the 2
parameter to specify that we want to take the mean along the rows of the matrix. Alternatively, we could use 1
to take the mean along the columns.
gistlibby LogSnag