<html><head></head><body><div style="color:#000; background-color:#fff; font-family:Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:10px"><div id="yiv9771018357"><div id="yui_3_16_0_ym19_1_1492631140948_8137"><div style="color:#000;background-color:#fff;font-family:Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:10px;" id="yui_3_16_0_ym19_1_1492631140948_8136"><div style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2677"><span style="font-size:10pt;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2678">Hello,</span></div><div style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2680" dir="ltr"><span style="font-size:10pt;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2681">I am
trying to get the average ERSP figure from 2 subjects. The script that I am using,
creates the ERSP figures for each subject separately. Which command should I add
to the script bellow to get the avaerage ERSP? I tryed to use the commands that I use for getting average ERP figure but it did not work. Thanks. Nabi </span></div><div style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2683"><span style="font-size:10pt;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2684">  </span></div><div style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2686"><span style="font-size:10pt;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2687">  </span></div><div style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2689"><span style="font-size:10pt;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2690">[ALLEEG
EEG CURRENTSET ALLCOM] = eeglab;</span><span style="font-size:12.0pt;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2691"></span></div><div style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2693"><span style="font-size:10pt;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2694">MAIN=</span><span style="font-size:10.0pt;color:#A020F0;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2695">'C:\\Users\\user\\Desktop\\ersp\\'</span><span style="font-size:10pt;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2696">;</span><span style="font-size:12.0pt;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2697"></span></div><div style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2699"><span style="font-size:10pt;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2700"> </span><span style="font-size:12.0pt;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2701"></span></div><div style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2703"><span style="font-size:10pt;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2704">SUBJ={</span><span style="font-size:10.0pt;color:#A020F0;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2705">'sbj3_'</span><span style="font-size:10pt;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2706"> </span><span style="font-size:10.0pt;color:#A020F0;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2707">'sbj4_'</span><span style="font-size:10pt;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2708">}; </span><span style="font-size:12.0pt;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2709"></span></div><div style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2711"><span style="font-size:10pt;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2712"> </span><span style="font-size:12.0pt;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2713"></span></div><div style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2715"><span style="font-size:10.0pt;color:blue;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2716">for</span><span style="font-size:10pt;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2717"> s=1:length(SUBJ)</span><span style="font-size:12.0pt;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2718"></span></div><div style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2720"><span style="font-size:10pt;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2721">    EEG= pop_loadset([SUBJ{s},</span><span style="font-size:10.0pt;color:#A020F0;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2722">'condition1.set'</span><span style="font-size:10pt;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2723">], MAIN);</span><span style="font-size:12.0pt;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2724"></span></div><div style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2726"><span style="font-size:10.0pt;color:forestgreen;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2727">%     EEG2= mean(EEG.data,3);</span><span style="font-size:12.0pt;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2728"></span></div><div style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2730"><span style="font-size:10.0pt;color:forestgreen;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2731">%     all_erp(s,:)= squeeze(erp); </span><span style="font-size:12.0pt;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2732"></span></div><div style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2734"><span style="font-size:10pt;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2735">    figure; pop_newtimef( EEG, 1, 22,
[-1000  1998], [0] , </span><span style="font-size:10.0pt;color:#A020F0;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2736">'topovec'</span><span style="font-size:10pt;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2737">, 22, </span><span style="font-size:10.0pt;color:#A020F0;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2738">'elocs'</span><span style="font-size:10pt;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2739">, EEG.chanlocs, </span><span style="font-size:10.0pt;color:#A020F0;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2740">'chaninfo'</span><span style="font-size:10pt;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2741">, EEG.chaninfo, </span><span style="font-size:10.0pt;color:#A020F0;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2742">'caption'</span><span style="font-size:10pt;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2743">, </span><span style="font-size:10.0pt;color:#A020F0;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2744">'Cz'</span><span style="font-size:10pt;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2745">, </span><span style="font-size:10.0pt;color:#A020F0;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2746">'baseline'</span><span style="font-size:10pt;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2747">,[0], </span><span style="font-size:10.0pt;color:#A020F0;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2748">'freqs'</span><span style="font-size:10pt;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2749">, [1:100], </span><span style="font-size:10.0pt;color:#A020F0;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2750">'plotphase'</span><span style="font-size:10pt;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2751">, </span><span style="font-size:10.0pt;color:#A020F0;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2752">'off'</span><span style="font-size:10pt;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2753">, </span><span style="font-size:10.0pt;color:#A020F0;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2754">'padratio'</span><span style="font-size:10pt;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2755">, 1);</span><span style="font-size:12.0pt;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2756"></span></div><div style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2758"><span style="font-size:10pt;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2759"> </span><span style="font-size:12.0pt;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2760"></span></div><div>





























</div><div style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;" dir="ltr" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2762"><span style="font-size:10.0pt;color:blue;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2763">end</span><span style="font-size:12.0pt;" id="yiv9771018357yui_3_16_0_ym19_1_1492631140948_2764"></span></div></div></div></div></div></body></html>