Average matrices by limiting the content
3 次查看(过去 30 天)
显示 更早的评论
I have two columns (Block,1,2,3; and Type, 6,7,8,12,13,14). Also, I have 10 columns of Reaction times for 10 people. The number of rows is 399 for each block, meaning 399 words in each block (399*3 total). I need to average all the 6 types for each block separately for all columns. I have come up with the following script for Block 1 , Type 6 but it seems it does not select only the reaction times in the first block and type 6.
for k=1:size(Block,1)
for r=1:size(Block,2)
if Block(k,r)==1 && Type(k,r)==6
b=0;
for m=1:size(RTc,1)
for n=1:size(RTc,2)
M_type6=mean(RTc,'omitnan');
b=b+1;
end
end
else
;
end
end
end
4 个评论
Bob Thompson
2018-4-4
Could you give examples of how your data is organized? I'm unsure still how things are related.
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Subsystems 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!