<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.apple-converted-space
        {mso-style-name:apple-converted-space;}
span.EmailStyle19
        {mso-style-type:personal-compose;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="blue" vlink="#954F72" style="word-wrap: break-word;-webkit-nbsp-mode: space;line-break:after-white-space">
<div class="WordSection1">
<p class="MsoNormal">Hi Jan-Mathijs,<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Thank you for replying back to me.  I made the suggested changes and I’m seeing better results as the majority of the area is not as blue and on some of the channels I’m seeing a more defined shaped.  In case you are interested I attached
 the new results.  Overall I’m satisfied with the results and see in come trials a more clearer response.
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I added a couple questions to two of your suggestions below.
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">This is the new block of code as well.  <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New"">cfg              = [];</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New"">                    cfg.output       = 'pow'; %return power spectra</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New"">                    cfg.channel      = 'all';</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New"">                    cfg.method       = 'wltconvol';                   
</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New"">                    %cfg.trials       = trigger_idx; %specify index location to find event in EEG_Data_Trial.trial</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New"">                    cfg.width        = 1; % 3 has shown some promise for results</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New"">                    cfg.gwidth       = 4; %decreasing this has shown to fill out are of the figure</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New"">                    cfg.pad          = 20; %increases resolution as the value goes up</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New"">                    cfg.foilim       = [1 30]; %1 to 30 Hz range</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New"">                    %cfg.toi          = -.10:0.0001:.35; %produced a full image time window from -100 ms to 350ms in 0.1ms steps</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New"">                    cfg.toi          = -.05:0.00001:.250; %time window from -50 ms to 250ms in 0.01ms steps</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New"">                   
</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New"">                    TFRwavelet = ft_freqanalysis(cfg, EEG_Data_Trial);</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New"">                    fprintf('\n Time-Freq wavelet for trigger index %u channel %s and processed %u trigger(s)\n',trigger_idx(i),channels{z},i)</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New"">                    %Create Image of EEG Spectrogram to output cdat matrix</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New"">                    cfg = [];</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New"">                    %cfg.baselinetype = 'relchange';</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New"">                    cfg.maskstyle = 'saturation';</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New"">                    cfg.zlim         =  'maxmin';</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New"">                    cfg.layout       = 'ordered';</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New"">                    cfg.showlabels   = 'yes';</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New"">                    cfg.showoutline      = 'yes';</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New"">                    %subplot(2,4,z)%used to create figures of plotted channels</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New"">                    [EEG_Spec] = ft_multiplotTFR(cfg, TFRwavelet);</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif">1 a). You can run ft_freqanalysis for all channels at once (without the for-loop)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif">From my understanding if I supply all channels for ft_freqanalysis and use ft_singleplotTFR then this will show one plot for a trial  with an average across all the channels
 (in my case 8). <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif">1 b). You may want to use cfg.method = ‘wltconvol’ for ft_freqanalysis, rather than ‘wavelet’ , since it’s much faster with equivalent results.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif">2). Next, you can call ft_freqbaseline (again: only once, and perhaps use ‘relchange’ as a method) to ‘baseline correct' the spectrograms.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif">What are the consequences of  running this more than once?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif">3). Next, you can use ft_multiplotTFR on the baseline corrected variable, using a cfg.layout = ‘ordered’, and don’t specify any baseline correction options here.<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">If I use ft_singleplotTFR again would you recommend I omit the baseline parameter too?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">I also want to add that when performing ft_freqanalysis I’m seeing these messages “Warning: output time-bins are different from input time-bins, multiples of the sametrial” for all my trails processing. When I’m looking at the trial cell
 data type and looking at the maxtrix defined inside their numbers are not same.  I was not able to find much information as to exactly how this is triggered. I did find the line of code the produces this but not entirely sure why it is triggered.  Is this
 message typically ignored? <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Kind Regards,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Daniel C.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><a name="_olk_signature">Sent from </a><a href="https://go.microsoft.com/fwlink/?LinkId=550986"><span style="mso-bookmark:_olk_signature">Mail</span><span style="mso-bookmark:_olk_signature"></span></a><span style="mso-bookmark:_olk_signature">
 for Windows 10<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-bookmark:_olk_signature"> </span><o:p></o:p></p>
<div class="MsoNormal" align="center" style="text-align:center"><span style="font-size:12.0pt;font-family:"Times New Roman",serif">
<hr size="2" width="98%" align="center">
</span></div>
<div id="divRplyFwdMsg">
<p class="MsoNormal"><b><span style="color:black">From:</span></b><span style="color:black"> fieldtrip <fieldtrip-bounces@science.ru.nl> on behalf of Schoffelen, J.M. (Jan Mathijs) <jan.schoffelen@donders.ru.nl><br>
<b>Sent:</b> Wednesday, June 19, 2019 10:24:23 AM<br>
<b>To:</b> FieldTrip discussion list<br>
<b>Subject:</b> Re: [FieldTrip] Issue with visualising EEG Spectrogram</span><span style="font-size:12.0pt;font-family:"Times New Roman",serif">
<o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif"> <o:p></o:p></span></p>
</div>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif">Hi Daniel,
<o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif">May I suggest you to do 4 things, rather than trying to really understand why no apparent baselining seems to have been applied.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif">1 a). You can run ft_freqanalysis for all channels at once (without the for-loop)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif">1 b). You may want to use cfg.method = ‘wltconvol’ for ft_freqanalysis, rather than ‘wavelet’ , since it’s much faster with equivalent results.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif">2). Next, you can call ft_freqbaseline (again: only once, and perhaps use ‘relchange’ as a method) to ‘baseline correct' the spectrograms.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif">3). Next, you can use ft_multiplotTFR on the baseline corrected variable, using a cfg.layout = ‘ordered’, and don’t specify any baseline correction options here.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif">Best wishes,<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif">Jan-Mathijs<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p> </o:p></span></p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><br>
<br>
<o:p></o:p></span></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif">On 18 Jun 2019, at 20:12, Daniel Campoy (CMP - Student) <<a href="mailto:D.Campoy@uea.ac.uk">D.Campoy@uea.ac.uk</a>> wrote:<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p> </o:p></span></p>
<div>
<div>
<p class="MsoNormal">Hello,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">I have been stuck trying to understand the results I’m seeing so please forgive me as my background is not in neuroscience. I’m a Masters student working with EEG data for a classification project using Matlab 2017b.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">I have been successful at visualising the data of a test subject for a specific trigger and plot all channels (dataset has 8 channels) from the trigger (image stimuli) using ft_singleplotTFR. Thus creating a 2x4 plot of images for all 8
 channels.  However I’m stuck trying understand my results when I plot an EEG spectrogram using ft_singleplotTFR for each channel across all triggers (T=1 in my dataset) the data does not show what I’ve seen for separate channels. It displays a plot of 8 images
 filled blue and a fine yellow/green bar across the bottom.  The only thing I’ve changed is supplying all the trials instead of one at a time using a for loop to iterate through each trial for 8 channels. I’ve removed the for loop outside of the for loop of
 channels since I’m supplying all trials. Below is my code and process. Any insight would be much appreciated and if you need further information please let me know.  I’ve attached an image of the results of each channel across all triggers.<span class="apple-converted-space"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">My first step is to load the .mat file I’ve saved containing all the defined trials. After this is complete, the below code is used to extract all the trigger events where the value in cfg.events is T=1.  I run the ft_<span style="font-size:10.0pt;font-family:"Courier New"">preprocessing</span>again
 but for the defined trials I’m looking for T=1.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">trigger = extractfield(cfg.event,<span style="color:#A020F0">'value'</span>);</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">channels = EEG_Data.cfg.channel;</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">trigger_idx = find(startsWith(trigger,<span style="color:#A020F0">'T=1'</span>));</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">cfg.trials       = trigger_idx;<span class="apple-converted-space"> </span><span style="color:forestgreen">%index location for all T=1 stimuli triggers</span></span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">EEG_Data_Trial = ft_preprocessing(cfg,EEG_Data);</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New""> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New""> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">After completion the next block of code is ran for each channel. You may have noticed the cdat variable is in the output, this is me modifying the ft_singleplotTFR function to return the EEG spectrogram matrix I use for later analysis.<span class="apple-converted-space"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New""> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New""> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">figure<span class="apple-converted-space"> </span><span style="color:forestgreen">%used to create a figure of EEG Spectrograms</span></span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New""> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New";color:blue">for</span><span class="apple-converted-space"><span style="font-size:10.0pt;font-family:"Courier New""> </span></span><span style="font-size:10.0pt;font-family:"Courier New"">z
 = 1:length(channels)<span class="apple-converted-space"> </span><span style="color:forestgreen">%Collect the measurements from each channel for a given trigger</span></span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">                    Img_idx = 1 + Img_idx;</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">                    cfg              = [];</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">                    cfg.output       =<span class="apple-converted-space"> </span><span style="color:#A020F0">'pow'</span>;<span class="apple-converted-space"> </span><span style="color:forestgreen">%return
 power spectra</span></span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">                    cfg.channel      = channels{z};</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">                    cfg.method       =<span class="apple-converted-space"> </span><span style="color:#A020F0">'wavelet'</span>;<span class="apple-converted-space"> </span><span style="color:forestgreen">%use
 wavelet function</span></span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">                   <span class="apple-converted-space"> </span><span style="color:forestgreen">%cfg.trials       = trigger_idx; %specify index location to find event in EEG_Data_Trial.trial</span></span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">                    cfg.width        = 1;<span class="apple-converted-space"> </span><span style="color:forestgreen">% 3 has shown some promise for results</span></span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">                    cfg.gwidth       = 4;<span class="apple-converted-space"> </span><span style="color:forestgreen">%decreasing this has shown to fill out are of the figure</span></span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">                    cfg.pad          = 20;<span class="apple-converted-space"> </span><span style="color:forestgreen">%increases resolution as the value goes up</span></span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">                    cfg.foilim       = [1 30];<span class="apple-converted-space"> </span><span style="color:forestgreen">%1 to 30 Hz range</span></span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">                    <span style="color:forestgreen">%cfg.toi          = -.10:0.0001:.35; %produced a full image time window from -100 ms to 350ms in 0.1ms steps</span></span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">                    cfg.toi          = -.05:0.00001:.250;<span class="apple-converted-space"> </span><span style="color:forestgreen">%time window from -50 ms to 250ms in 0.01ms steps</span></span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">                   </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">                    TFRwavelet = ft_freqanalysis(cfg, EEG_Data_Trial);</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">                    fprintf(<span style="color:#A020F0">'\n Time-Freq wavelet for trigger index %u channel %s and processed %u trigger(s)\n'</span>,trigger_idx(i),channels{z},i)</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">                   <span class="apple-converted-space"> </span><span style="color:forestgreen">%Create Image of EEG Spectrogram to output cdat matrix</span></span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">                    cfg = [];</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">                    cfg.baselinetype =<span class="apple-converted-space"> </span><span style="color:#A020F0">'absolute'</span>;</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">                    cfg.maskstyle =<span class="apple-converted-space"> </span><span style="color:#A020F0">'saturation'</span>;</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">                    cfg.zlim         = <span class="apple-converted-space"> </span><span style="color:#A020F0">'maxmin'</span>;</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">                    subplot(2,4,z)<span style="color:forestgreen">%used to create figures of plotted channels</span></span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">                    [EEG_Spec,cdat] = ft_singleplotTFR(cfg, TFRwavelet);</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">                    subplot(2,4,z)<span style="color:forestgreen">%used to create figures of plotted channels</span></span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New";color:blue">end</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Courier New""> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Thank you and kind regards,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Daniel C.<o:p></o:p></p>
</div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><OneSub_acrossTrails_T1.png></span><span style="font-size:10.5pt;font-family:"Helvetica",sans-serif">_______________________________________________<br>
fieldtrip mailing list<br>
</span><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.science.ru.nl%2Fmailman%2Flistinfo%2Ffieldtrip&data=02%7C01%7CD.Campoy%40uea.ac.uk%7C0d621a78d97846b0dc3508d6f4983ae3%7Cc65f8795ba3d43518a070865e5d8f090%7C0%7C0%7C636965332006247409&sdata=4UGJMnGMb2swnfBUuhyzfLOzEU09VmONTG98868xfmE%3D&reserved=0"><span style="font-size:10.5pt;font-family:"Helvetica",sans-serif;color:#954F72">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</span></a></span><span style="font-size:10.5pt;font-family:"Helvetica",sans-serif"><br>
</span><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdoi.org%2F10.1371%2Fjournal.pcbi.1002202&data=02%7C01%7CD.Campoy%40uea.ac.uk%7C0d621a78d97846b0dc3508d6f4983ae3%7Cc65f8795ba3d43518a070865e5d8f090%7C0%7C0%7C636965332006247409&sdata=KuDpLZP51plE5ifAuPvM5xD8WiHQyvMWKuPJBLZOagM%3D&reserved=0"><span style="font-size:10.5pt;font-family:"Helvetica",sans-serif;color:#954F72">https://doi.org/10.1371/journal.pcbi.1002202</span></a><o:p></o:p></span></p>
</div>
</blockquote>
</div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p> </o:p></span></p>
</div>
</div>
</div>
</body>
</html>