I have data from an experiment in which each row is a different trial. The table has several columns with information about the trial, and then 1000 columns of data.
I need to filter out certain trials (rows) based on various criteria in order to calculate means from valid trials only. For example, I have a column with accuracy data (0 = error, 1 = correct), and a column with response time data (need to filter out responses < 200). I assume I need to loop through each row to create a new true/false logical column based on my criteria (e.g., valid trials are accuracy == 1 & RT > 200).
Then, I need to create means of only valid trials grouped by conditions which are defined by strings in another column (e.g., create 3 means based on a valence column with "negative", "neutral" and "positive"). I know this is probably relatively simple to do, I am new to MATLAB. All suggestions appreciated.
Best Answer