Commit f87819d2 authored by Julius Welzel's avatar Julius Welzel

Replace ana06_cluster.m

parent a0d94aab
......@@ -78,45 +78,7 @@ for s = find(old)
end
%% Plot topographie interpolated with
figure
ax1 = subplot(2,4,[1 2])
Z_young = griddata(elocsX,elocsY,top_young,Xgrid,Ygrid,'cubic');
mesh(Xgrid,Ygrid,Z_young) % interpolate
colormap(ax1,c_young_map)
axis tight;hold on;
plot3(elocsX,elocsY,top_young,'.k','MarkerSize',15)
title 'Interpolated Topoplot Young'
hold on
surf(Xgrid,Ygrid,min(min(Z_young))*0.5*ones(size(Z_old)),'FaceAlpha',0.5,'EdgeColor','none')
ax2 = subplot(2,4,[5 6])
Z_old = griddata(elocsX,elocsY,top_old,Xgrid,Ygrid,'cubic');
mesh(Xgrid,Ygrid,Z_old) % interpolate
colormap(ax2,c_old_map)
axis tight;hold on;
plot3(elocsX,elocsY,top_old,'.k','MarkerSize',15)
title 'Interpolated Topoplot Old'
hold on
surf(Xgrid,Ygrid,min(min(Z_old))*0.5*ones(size(Z_old)),'FaceAlpha',0.5,'EdgeColor','none')
x_values = linspace(0,3,length(surf_old));
subplot(2,4,[3 4 7 8])
pd = fitdist([surf_old{:}]','normal');
y = pdf(pd,x_values);
p1 = plot(x_values,y,'Color',c_old,'LineWidth',2)
hold on
scatter([surf_old{:}],x_values,2,c_old)
hold on
pd = fitdist([surf_young{:}]','normal');
y = pdf(pd,x_values);
p2 = plot(x_values,y,'Color',c_young,'LineWidth',2)
hold on
scatter([surf_young{:}],x_values,2,c_young)
legend([p1 p2],{'OLD','YOUNG'})
title ({'Surface Area of highest 50% ERD','All trials each group'})
save_fig(gcf,PATHOUT_CLUSTER,'surf_area_ERD_st','fontsize',10,'figsize',[0 0 35 25]);
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
......@@ -179,7 +141,7 @@ legend('Young','Old')
xlabel 'RTs [ms]'
ylabel 'Lateralisation [%]'
title 'Trials RTs vs. Lateralisation for all participants MI1'
save_fig(gcf,PATHOUT_CLUSTER,'RTvsLAT_MI1','fontsize',10,'figsize',[0 0 30 25]);
save_fig(gcf,PATHOUT_CLUSTER,'RTvsLAT_MI1','fontsize',15,'figsize',[0 0 20 15]);
figure
scatterhist(RT_vec(blck_idx==2),ERD_vec(blck_idx==2),'Group',g_idx_vec(blck_idx==2),'Kernel','on','Color',[c_young;c_old])
......@@ -187,15 +149,15 @@ legend('Young','Old')
xlabel 'RTs [ms]'
ylabel 'Lateralisation [%]'
title 'Trials RTs vs. Lateralisation for all participants MI2'
save_fig(gcf,PATHOUT_CLUSTER,'RTvsLAT_MI2','fontsize',10,'figsize',[0 0 30 25]);
save_fig(gcf,PATHOUT_CLUSTER,'RTvsLAT_MI2','fontsize',15,'figsize',[0 0 20 15]);
figure
scatterhist(RT_vec,ERD_vec,'Group',g_idx_vec,'Kernel','on','Color',[c_young;c_old])
legend('Young','Old')
xlabel 'RTs [ms]'
ylabel 'Lateralisation [%]'
title 'Trials RTs vs. Lateralisation for all participants MI1 & MI2'
save_fig(gcf,PATHOUT_CLUSTER,'RTvsLAT_MI12','fontsize',10,'figsize',[0 0 30 25]);
title ({'Trials RTs vs. Lateralisation','All participants MI1 & MI2'})
save_fig(gcf,PATHOUT_CLUSTER,'RTvsLAT_MI12','fontsize',25,'figsize',[0 0 35 27]);
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
......@@ -206,7 +168,10 @@ save_fig(gcf,PATHOUT_CLUSTER,'RTvsLAT_MI12','fontsize',10,'figsize',[0 0 30 25])
clust_old = mds_cent(nanmean(m_rERD_trial(old,:,MI_trials),3));
clust_young = mds_cent(nanmean(m_rERD_trial(young,:,MI_trials),3));
plot(clust_old(:,1),clust_old(:,2),'or','MarkerSize',10);
plot(clust_old(:,1),clust_old(:,2),'.','MarkerSize',25,'Color',c_old);
hold on
plot(clust_young(:,1),clust_old(:,2),'xg','MarkerSize',10);
plot(clust_young(:,1),clust_old(:,2),'.','MarkerSize',25,'Color',c_young);
legend('Old','Young')
title 'MDS clsutering (64 channel)'
save_fig(gcf,PATHOUT_CLUSTER,'MDS_64_chan','fontsize',20,'figsize',[0 0 15 15]);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment