function [ output_args ] = plot_psd_10sec( out1,name1,out2,name2, freq)
session_A_index = [1 2 5 6 9  10 13 14 17 18 21 22 27 28 31 32 35 36 39];
session_B_index = [3 4 7 8 11 12 15 16 19 20 23 24 25 26 29 30 33 34 37 38];
session_A_s_index = [1 5 9  13 17 21 27 31 35 39];
session_B_s_index = [3 7 11 15 19 23 25 29 33 37];

figure('name',name1);
temp = squeeze(mean(out1,3));
temp = temp(:,any(temp));
out(:,1) = mean(temp,2);
plot(freq,out(:,1),'r','Linewidth',1);hold on;
qq = mean(out,2);
% plot(xlim,[qq(9) qq(9)],'--r');
plot(freq(session_A_s_index),qq([session_A_s_index]),'ok','markers',12);
%plot([8 8.4 9.2 9.6 10 10.6 11 11.4 11.8],qq([1 5 13 17 21 27 31 35 39 ]),'ok','markers',12);
plot([8 11.8],[mean(out(session_A_s_index)) mean(out(session_A_s_index))],'--r');
plot([8 11.8],[mean(out(setdiff(session_A_index,session_A_s_index))) mean(out(setdiff(session_A_index,session_A_s_index)))],'--k');
xlim([8 11.8]);
set(gca,'XTick',[8:0.2:11.8]);
set(gca,'XTickLabelRotation',45);
box off;
ylabel('uV');
xlabel('Frequency');
set(gca,'fontsize',20)
hold off;

figure('name',name2);
temp2 = squeeze(mean(out2,3));
temp2 = temp2(:,any(temp2));
out(:,1) = mean(temp2,2);
plot(freq,out(:,1),'r','Linewidth',1);hold on;
qq2 = mean(out,2);
% plot(xlim,[qq2(9) qq2(9)],'--r');
plot(freq(session_B_s_index),qq2([session_B_s_index]),'ok','markers',12);
%     plot([8 8.4  9.2 9.6 10 10.6 11 11.4 11.8],qq2([1 5 13 17 21 27 31 35 39 ]),'ok','markers',12);
plot([8 11.8],[mean(out(session_B_s_index)) mean(out(session_B_s_index))],'--r');
plot([8 11.8],[mean(out(setdiff(session_B_index,session_B_s_index))) mean(out(setdiff(session_B_index,session_B_s_index)))],'--k');
xlim([8 11.8]);
set(gca,'XTick',[8:0.2:11.8]);
set(gca,'XTickLabelRotation',45);
box off;
ylabel('uV');
xlabel('Frequency');
set(gca,'fontsize',20)
hold off;


end

