<html><head><base href="x-msg://686/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Dear Saim,<div><br></div><div>yes, it is possible to compute and save trial information. Simply check the checkbox in the STUDY graphic interface to save single trials or use 'savetrials', 'on' from the command line. Trials will be saved in the 3rd dimension of the arrays you are mentioning.</div><div><br></div><div>Best regards,</div><div><br></div><div>A. Delorme</div><div><br></div><div><div><div>On Jun 30, 2010, at 9:26 AM, Saim Rasheed wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div class="hmmessage" style="font-size: 10pt; font-family: Verdana; "><br>Thankyou very much Julie and Arno,<br> <br>Your help really worked. I have got the ERSP and itc data into Matlab workspace. I have got another problem.<br>I have recorded the data for three different visual stimuli conditions from 4 electrode positions at 256 samples per second. There are certain number of time-locked trials, e.g. 60, 58 55 for three conditions respectively. Each trial consists of 3 seconds of data containing 768 data points, which were automatically processed into 200 time points and 100 frequency points from 3Hz to 128Hz. Now I can see in workspace, 100*200 variable each for all electrode positions as chan1_ersp, chan2_ersp, chan3_ersp and chan4_ersp. Trial information is bit confused for me now. Is it lost now? Is it possible to compute ERSP and ITC trial by trial because I need to process a single-trial for each visual condition.<br>Thanks<br> <br>Saim<br><br> <br><br>> Subject: Re: [Eeglablist] Numerical Values in STUDY Structure<br>> From:<span class="Apple-converted-space"> </span><a href="mailto:arno@ucsd.edu">arno@ucsd.edu</a><br>> Date: Tue, 29 Jun 2010 17:52:09 -0700<br>> To:<span class="Apple-converted-space"> </span><a href="mailto:saim_rasheed@hotmail.com">saim_rasheed@hotmail.com</a>;<span class="Apple-converted-space"> </span><a href="mailto:eeglablist@sccn.ucsd.edu">eeglablist@sccn.ucsd.edu</a><br>><span class="Apple-converted-space"> </span><br>> Another simple solution is to add additional output to the STUDY plotting functions after copying them from the history.<br>> For instance, after creating or loading an EEGLAB STUDY, then precomputing the ERP for data channel, you may use the channel plotting interface to plot the ERP for electrode CZ (for instance). Then, the EEGLAB history contains the line<br>><span class="Apple-converted-space"> </span><br>> STUDY = std_erpplot(STUDY, ALLEEG, 'channels', { 'cz' });<span class="Apple-converted-space"> </span><br>><span class="Apple-converted-space"> </span><br>> Then, looking at the std_erpplot function help, you may add additional outputs<br>><span class="Apple-converted-space"> </span><br>> [STUDY erp erptimes ] = std_erpplot(STUDY, ALLEEG, 'channels', { 'cz' });<span class="Apple-converted-space"> </span><br>><span class="Apple-converted-space"> </span><br>> Note that the "erp" output will be a cell array containing an array for the ERP of each condition/group. If one subject only is present, each array will be a vector of values for the ERP of this subject in a given condition. If several subjects are present, each column of the array will contain the ERP for a given subject.<br>><span class="Apple-converted-space"> </span><br>> Arno<br>><span class="Apple-converted-space"> </span><br>> On Jun 29, 2010, at 10:46 AM, Julie Onton wrote:<br>><span class="Apple-converted-space"> </span><br>> > Good question.<br>> ><span class="Apple-converted-space"> </span><br>> > Below is a script to help you find, load and plot your raw data.<br>> ><span class="Apple-converted-space"> </span><br>> > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%<br>> > % LOAD raw data:------------------------<br>> > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%<br>> > basedir = '/home/you/whereyourdatais/';<br>> ><span class="Apple-converted-space"> </span><br>> > subjs =<br>> > {'S01','S02','S03','S04','S05','S06','S07','S08','S09','S10','S11','S12','S13'};<br>> ><span class="Apple-converted-space"> </span><br>> > subj = 3; % who do you want to plot?<br>> > cond = 1; % what condition number?<br>> ><span class="Apple-converted-space"> </span><br>> > % for example, load ERSP:<br>> > load_string =<br>> > [basedir,subjs{subj},'\',STUDY.datasetinfo(1).filename(1:end-4),'.icaersp'];<br>> ><span class="Apple-converted-space"> </span><br>> > % OR ITC<br>> > load_string =<br>> > [basedir,subjs{subj},'\',STUDY.datasetinfo(1).filename(1:end-4),'.icaitc'];<br>> ><span class="Apple-converted-space"> </span><br>> > % OR spectra:<br>> > load_string =<br>> > [basedir,subjs{subj},'\',STUDY.datasetinfo(1).filename(1:end-4),'.icaspec'];<br>> ><span class="Apple-converted-space"> </span><br>> > % OR topomaps:<br>> > load_string =<br>> > [basedir,subjs{subj},'\',STUDY.datasetinfo(1).filename(1:end-4),'.icatopo'];<br>> ><span class="Apple-converted-space"> </span><br>> > % load the raw data into the variable 'RAWdata':<br>> > RAWdata = load('-mat',load_string);<br>> ><span class="Apple-converted-space"> </span><br>> > % Mask an ERSP using calculated bootstrap limits (if you calculated them):<br>> ><span class="Apple-converted-space"> </span><br>> > ic = 8; % choose IC to plot<br>> ><span class="Apple-converted-space"> </span><br>> > oneic = ['RAWdata.comp',int2str(ic),'_ersp'];<br>> > oneic = eval(oneic);<br>> > % in case you want to see the removed baseline:<br>> > onebase = ['RAWdata.comp',int2str(ic),'_erspbase'];<br>> > onebase = eval(onebase);<br>> > % load the bootstrap significance limits:<br>> > oneboot = ['RAWdata.comp',int2str(ic),'_erspboot'];<br>> > oneboot = eval(oneboot);<br>> ><span class="Apple-converted-space"> </span><br>> > maskERSP = oneic;<br>> > % zero out non-sig values:<br>> > maskERSP(find(oneic > repmat(oneboot(:,1),[1 size(oneic,2)])& oneic <<br>> > repmat(oneboot(:,2),[1 size(oneic,2)]))) = 0;<br>> ><span class="Apple-converted-space"> </span><br>> > clim = 4; % set +/- color limits<br>> > figure; imagesc(RAWdata.times,RAWdata.freqs,maskERSP,[-clim clim]);<br>> > set(gca,'ydir','norm');<br>> > title(['Subj ',int2str(subj),'; IC ',int2str(ic),'; ',STUDY.condition{cond}]);<br>> > cbar;<br>> ><span class="Apple-converted-space"> </span><br>> ><span class="Apple-converted-space"> </span><br>> > Hope this helps, Julie<br>> ><span class="Apple-converted-space"> </span><br>> > --<span class="Apple-converted-space"> </span><br>> > Julie Onton, PhD<br>> ><span class="Apple-converted-space"> </span><a href="http://sccn.ucsd.edu/~julie">http://sccn.ucsd.edu/~julie</a><br>> ><span class="Apple-converted-space"> </span><br>> >><span class="Apple-converted-space"> </span><br>> >><span class="Apple-converted-space"> </span><br>> >><span class="Apple-converted-space"> </span><br>> >> Hi,<br>> >><span class="Apple-converted-space"> </span><br>> >><span class="Apple-converted-space"> </span><br>> >><span class="Apple-converted-space"> </span><br>> >> I am working with STUDY structure and computed ERSP, ITC and. I can plot them<br>> >> by a single click and analyse them.<br>> >><span class="Apple-converted-space"> </span><br>> >> Where I can find the numerical values for ERSP and ITC ? Where these values<br>> >> are stored?<br>> >><span class="Apple-converted-space"> </span><br>> >><span class="Apple-converted-space"> </span><br>> >><span class="Apple-converted-space"> </span><br>> >> I need them for further computations. Please help.<br>> >><span class="Apple-converted-space"> </span><br>> >><span class="Apple-converted-space"> </span><br>> >><span class="Apple-converted-space"> </span><br>> >> Thanks.<br>> >><span class="Apple-converted-space"> </span><br>> >><span class="Apple-converted-space"> </span><br>> >><span class="Apple-converted-space"> </span><br>> >> Saim<br>> >><span class="Apple-converted-space"> </span><br>> >> _________________________________________________________________<br>> >> Your E-mail and More On-the-Go. Get Windows Live Hotmail Free.<br>> >><span class="Apple-converted-space"> </span><a href="https://signup.live.com/signup.aspx?id=60969_______________________________________________">https://signup.live.com/signup.aspx?id=60969_______________________________________________</a><br>> >> Eeglablist page:<span class="Apple-converted-space"> </span><a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html">http://sccn.ucsd.edu/eeglab/eeglabmail.html</a><br>> >> To unsubscribe, send an empty email to<span class="Apple-converted-space"> </span><a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu">eeglablist-unsubscribe@sccn.ucsd.edu</a><br>> >> For digest mode, send an email with the subject "set digest mime" to<br>> >><span class="Apple-converted-space"> </span><a href="mailto:eeglablist-request@sccn.ucsd.edu">eeglablist-request@sccn.ucsd.edu</a><br>> ><span class="Apple-converted-space"> </span><br>> > _______________________________________________<br>> > Eeglablist page:<span class="Apple-converted-space"> </span><a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html">http://sccn.ucsd.edu/eeglab/eeglabmail.html</a><br>> > To unsubscribe, send an empty email to<span class="Apple-converted-space"> </span><a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu">eeglablist-unsubscribe@sccn.ucsd.edu</a><br>> > For digest mode, send an email with the subject "set digest mime" to<span class="Apple-converted-space"> </span><a href="mailto:eeglablist-request@sccn.ucsd.edu">eeglablist-request@sccn.ucsd.edu</a><br>><span class="Apple-converted-space"> </span><br><br><hr>Hotmail: Trusted email with powerful SPAM protection.<span class="Apple-converted-space"> </span><a href="https://signup.live.com/signup.aspx?id=60969" target="_new">Sign up now.</a></div></span></blockquote></div><br></div></body></html>