Commit 72fecd6c authored by Julius Welzel's avatar Julius Welzel

Age for all groups

parent 1da5daa7
......@@ -37,13 +37,14 @@ b = figure;
[unique_groups, ~, group_idx] = unique(sex);
pointsize = 150;
scatter(age,MoCa, pointsize, group_idx,'s','filled');
cmap = cbrewer('seq', 'Blues',6); %or build a custom color map
colormap( [cmap(5,:);0.5 0.5 0.5] );
cmap = cbrewer('seq', 'Greens',6); %or build a custom color map
colormap( [0.5 0.5 0.5;cmap(4,:)] );
legend('female','male');
ylim([23 30])
ylabel 'MoCa score'
ylabel 'MoCA score'
xlim([50 85])
xlabel 'Age'
xlabel 'Age [years]'
legend boxoff
save_fig(gcf,PATHOUT,'scatter_moca_age','fontsize',25,'figsize',[0 0 20 20])
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
......@@ -53,7 +54,7 @@ save_fig(gcf,PATHOUT,'scatter_moca_age','fontsize',25,'figsize',[0 0 20 20])
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% extract trial relevant markers // 1 = Start, 0 = Stimulus start, 2 = trial end
load ([PATHIN_RTs 'RTs_mue.mat']);
load ([PATHIN_RTs 'RTs.mat']);
load ([PATHIN_RTs 'cfg.mat']);
load ([PATHIN_EMG 'emg_all.mat']);
cfg.n_trials = 96;
......@@ -61,8 +62,8 @@ SUBJ = str2double(SUBJ);
%% plot
old = (SUBJ<80);
young = (SUBJ>=80);
old = (SUBJ>=80);
young = (SUBJ<80);
g_idx = ones(1,(length(RT)));
g_idx(old) = 0;
......@@ -80,6 +81,7 @@ for t = 1:length(RT)
ex1(~emg_check(t).trials_valid(cfg.blck_idx{1,1}),t) = NaN;
mi1(:,t) = RT(t).times(cfg.blck_idx{2,1});
mi2(:,t) = RT(t).times(cfg.blck_idx{3,1});
if length(RT(t).times)>100
ex2(:,t) = RT(t).times(249:256);
ex2(~emg_check(t).trials_valid(249:256),t) = NaN;
......@@ -158,13 +160,13 @@ blck_time_y_se = [ex1_y_se mi1_y_se mi2_y_se ex2_y_se];
blck_time_o_se = [ex1_o_se mi1_o_se mi2_o_se ex2_o_se];
figure
t_o = shadedErrorBar(b,blck_time_y,blck_time_y_se,'lineprops',{'-','Color',c_young,'LineWidth',2})
t_y = shadedErrorBar(b,blck_time_y,blck_time_y_se,'lineprops',{'-','Color',c_young,'LineWidth',2})
hold on
errorbar(blck_time_y,blck_time_y_se,'-','Color',c_young,'LineWidth',2)
e_y = errorbar(blck_time_y,blck_time_y_se,'-','Color',c_young,'LineWidth',2)
hold on
t_y = shadedErrorBar(b,blck_time_o,blck_time_o_se,'lineprops',{'-','Color',c_old,'LineWidth',2})
t_o = shadedErrorBar(b,blck_time_o,blck_time_o_se,'lineprops',{'-','Color',c_old,'LineWidth',2})
hold on
errorbar(blck_time_o,blck_time_o_se,'-','Color',c_old,'LineWidth',2)
e_o = errorbar(blck_time_o,blck_time_o_se,'-','Color',c_old,'LineWidth',2)
t_o.edge(1).LineWidth = 2;
......@@ -178,6 +180,8 @@ xticklabels({'EX 1','MI 1','MI 2','EX 2'})
ylabel('[ms]');
xlabel('Blocks');
legend ([e_o,e_y],{'Old','Young'})
legend boxoff
%set figure screensize and save
save_fig(gcf,PATHOUT,'RTs_blck.png','fontsize',25,'figsize',[0 0 30 20])
......
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