Write a for loop to find the mean and standard error of reaction time in each condition and put them in a structure?

2 vues (au cours des 30 derniers jours)
I have a dada containing a single subject performing a stroop task.
Cong - 1=congruent, 2=neutral, 3=incongruent
Stim - 1=words, 2=colours
data - reaction time
err - error rate, 1=error
how to write a for loop to find the mean and standard error of reaction time in each condition and put them in a structure?
Here is my code:
for k=1:3
meancong(k) = mean(data(cong==k))
stdcong(k)=std(data(cong==k))
end
But I don't know how to save each condition separately and put them in a struture. Can anybody help?

Réponses (1)

Divya Yerraguntla
Divya Yerraguntla le 17 Mar 2020

Catégories

En savoir plus sur Loops and Conditional Statements dans Help Center et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by