1234567891011121314151617181920212223242526272829 |
- bins=[0:0.05:1];
- bin=[0.05:0.05:1];
- xc_group=histcounts(offset_group,bins,'Normalization','probability');
- xc_group_mean=squeeze(mean(mean(offset_group,2),1));
- xc_time=histcounts(offset_time,bins,'Normalization','probability');
- xc_time_mean=squeeze(mean(mean(offset_time,2),1));
- figure
- p1=plot(bin,xc_group,'b-','LineWidth',2);
- hold on
- p2=plot(bin,xc_time,'r-','LineWidth',2);
- ylim([0 .7])
- xlim([.5 1])
- plot([xc_group_mean xc_group_mean],get(gca,'ylim'),'b--','LineWidth',2)
- plot([xc_time_mean xc_time_mean],get(gca,'ylim'),'r--','LineWidth',2)
- legend([p1(1) p2(1)],{'Groups over time','Timepoints over groups'})
- title('Cross-correlation of group matrices')
- ylabel('percentage of matrices')
- xlabel('normalized offset at zero lag')
- %%
- xlswrite('xcorr_group.xls',offset_group)
- xlswrite('xcorr_time.xls',offset_time)
- xlswrite('norm_indv_fc.xls',norm_ROI)
|