<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css" id="owaParaStyle"></style>
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Dear Tianyang,
<div><br>
</div>
<div>maybe it's a good idea to download the accompanying sample data from the tutorial and look if you can recreate the shown data structure. Then look closer into the values of the respective fields. That should give you a better grasp on what is required
 there. </div>
<div><br>
</div>
<div>I have not fully looked into the code but my feeling is that spikeTrials.timestamp is not of any further use and is just carried from the data structure before (which was not cut into trials and where the raw timestamps were useful). The timing of spikes
 relative to the trial zero point is fully described in the fields ".time", ".trial" and ".trialtime".</div>
<div>Best,</div>
<div>Andreas </div>
<div><br>
</div>
<div><br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<div id="divRpF625519" style="direction: ltr;"><font face="Tahoma" size="2" color="#000000"><b>From:</b> fieldtrip-bounces@science.ru.nl [fieldtrip-bounces@science.ru.nl] on behalf of ÂíÌìÑô [tianyangma2013@gmail.com]<br>
<b>Sent:</b> Monday, August 28, 2017 5:31 PM<br>
<b>To:</b> FieldTrip discussion list<br>
<b>Subject:</b> Re: [FieldTrip] Using PPC method<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr">Dear Andreas,
<div><br>
</div>
<div>I still don't quite understand the tutorial.</div>
<div>
<pre class="gmail-code gmail-matlab" style="overflow:auto; font-family:Menlo,Monaco,Consolas,"Courier New",monospace; padding:9.5px; margin-top:0px; margin-bottom:10px; line-height:1.42857; word-break:break-all; word-wrap:break-word; color:rgb(51,51,51); border:1px solid rgb(204,204,204); white-space:pre-wrap; background-color:rgb(245,245,245)"><font size="1">spikeTrials = 
         label: <span class="gmail-br0" style="color:rgb(102,204,102)">{</span><span class="gmail-co2" style="color:rgb(51,153,51)">'sig002a_wf'</span>  <span class="gmail-co2" style="color:rgb(51,153,51)">'sig003a_wf'</span><span class="gmail-br0" style="color:rgb(102,204,102)">}</span>
     timestamp: <span class="gmail-br0" style="color:rgb(102,204,102)">{</span><span class="gmail-br0" style="color:rgb(102,204,102)">[</span>1x83601 <a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/int32.html" style="color:rgb(51,153,243); text-decoration:none; background-color:transparent" target="_blank"><span class="gmail-kw2" style="color:rgb(0,0,0); font-weight:bold">int32</span></a><span class="gmail-br0" style="color:rgb(102,204,102)">]</span>  <span class="gmail-br0" style="color:rgb(102,204,102)">[</span>1x61513 <a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/int32.html" style="color:rgb(51,153,243); text-decoration:none; background-color:transparent" target="_blank"><span class="gmail-kw2" style="color:rgb(0,0,0); font-weight:bold">int32</span></a><span class="gmail-br0" style="color:rgb(102,204,102)">]</span><span class="gmail-br0" style="color:rgb(102,204,102)">}</span>
      waveform: <span class="gmail-br0" style="color:rgb(102,204,102)">{</span><span class="gmail-br0" style="color:rgb(102,204,102)">[</span>1x32x83601 <a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/double.html" style="color:rgb(51,153,243); text-decoration:none; background-color:transparent" target="_blank"><span class="gmail-kw2" style="color:rgb(0,0,0); font-weight:bold">double</span></a><span class="gmail-br0" style="color:rgb(102,204,102)">]</span>  <span class="gmail-br0" style="color:rgb(102,204,102)">[</span>1x32x61513 <a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/double.html" style="color:rgb(51,153,243); text-decoration:none; background-color:transparent" target="_blank"><span class="gmail-kw2" style="color:rgb(0,0,0); font-weight:bold">double</span></a><span class="gmail-br0" style="color:rgb(102,204,102)">]</span><span class="gmail-br0" style="color:rgb(102,204,102)">}</span>
          unit: <span class="gmail-br0" style="color:rgb(102,204,102)">{</span><span class="gmail-br0" style="color:rgb(102,204,102)">[</span>1x83601 <a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/double.html" style="color:rgb(51,153,243); text-decoration:none; background-color:transparent" target="_blank"><span class="gmail-kw2" style="color:rgb(0,0,0); font-weight:bold">double</span></a><span class="gmail-br0" style="color:rgb(102,204,102)">]</span>  <span class="gmail-br0" style="color:rgb(102,204,102)">[</span>1x61513 <a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/double.html" style="color:rgb(51,153,243); text-decoration:none; background-color:transparent" target="_blank"><span class="gmail-kw2" style="color:rgb(0,0,0); font-weight:bold">double</span></a><span class="gmail-br0" style="color:rgb(102,204,102)">]</span><span class="gmail-br0" style="color:rgb(102,204,102)">}</span>
           hdr: <span class="gmail-br0" style="color:rgb(102,204,102)">[</span>1x1 <a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/struct.html" style="color:rgb(51,153,243); text-decoration:none; background-color:transparent" target="_blank"><span class="gmail-kw2" style="color:rgb(0,0,0); font-weight:bold">struct</span></a><span class="gmail-br0" style="color:rgb(102,204,102)">]</span>
        dimord: <span class="gmail-co2" style="color:rgb(51,153,51)">'{chan}_lead_time_spike'</span>
           cfg: <span class="gmail-br0" style="color:rgb(102,204,102)">[</span>1x1 <a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/struct.html" style="color:rgb(51,153,243); text-decoration:none; background-color:transparent" target="_blank"><span class="gmail-kw2" style="color:rgb(0,0,0); font-weight:bold">struct</span></a><span class="gmail-br0" style="color:rgb(102,204,102)">]</span>
          time: <span class="gmail-br0" style="color:rgb(102,204,102)">{</span><span class="gmail-br0" style="color:rgb(102,204,102)">[</span>1x83601 <a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/double.html" style="color:rgb(51,153,243); text-decoration:none; background-color:transparent" target="_blank"><span class="gmail-kw2" style="color:rgb(0,0,0); font-weight:bold">double</span></a><span class="gmail-br0" style="color:rgb(102,204,102)">]</span>  <span class="gmail-br0" style="color:rgb(102,204,102)">[</span>1x61513 <a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/double.html" style="color:rgb(51,153,243); text-decoration:none; background-color:transparent" target="_blank"><span class="gmail-kw2" style="color:rgb(0,0,0); font-weight:bold">double</span></a><span class="gmail-br0" style="color:rgb(102,204,102)">]</span><span class="gmail-br0" style="color:rgb(102,204,102)">}</span>
         trial: <span class="gmail-br0" style="color:rgb(102,204,102)">{</span><span class="gmail-br0" style="color:rgb(102,204,102)">[</span>1x83601 <a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/double.html" style="color:rgb(51,153,243); text-decoration:none; background-color:transparent" target="_blank"><span class="gmail-kw2" style="color:rgb(0,0,0); font-weight:bold">double</span></a><span class="gmail-br0" style="color:rgb(102,204,102)">]</span>  <span class="gmail-br0" style="color:rgb(102,204,102)">[</span>1x61513 <a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/double.html" style="color:rgb(51,153,243); text-decoration:none; background-color:transparent" target="_blank"><span class="gmail-kw2" style="color:rgb(0,0,0); font-weight:bold">double</span></a><span class="gmail-br0" style="color:rgb(102,204,102)">]</span><span class="gmail-br0" style="color:rgb(102,204,102)">}</span>
     trialtime: <span class="gmail-br0" style="color:rgb(102,204,102)">[</span>600x2 <a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/double.html" style="color:rgb(51,153,243); text-decoration:none; background-color:transparent" target="_blank"><span class="gmail-kw2" style="color:rgb(0,0,0); font-weight:bold">double</span></a><span class="gmail-br0" style="color:rgb(102,204,102)">]</span></font></pre>
<pre class="gmail-code gmail-matlab" style="overflow:auto; font-family:Menlo,Monaco,Consolas,"Courier New",monospace; padding:9.5px; margin-top:0px; margin-bottom:10px; line-height:1.42857; word-break:break-all; word-wrap:break-word; color:rgb(51,51,51); border:1px solid rgb(204,204,204); white-space:pre-wrap; background-color:rgb(245,245,245)">Like here, I don't know why for timestamp,time and trial, there are same number of values. If I have one unit, 60 trials and focus on -0.5 s to 0.5 s around stimulus event, I think trial means which trial of the 60 trials has spikes in this 1 s. The time means time point of spikes located in the 1 s around stimulus for each trial. Is it correct? But what about the timestamp? It means from the beginning of recording to the end and has nothing to do with trials?</pre>
<pre class="gmail-code gmail-matlab" style="overflow:auto; font-family:Menlo,Monaco,Consolas,"Courier New",monospace; padding:9.5px; margin-top:0px; margin-bottom:10px; line-height:1.42857; word-break:break-all; word-wrap:break-word; color:rgb(51,51,51); border:1px solid rgb(204,204,204); white-space:pre-wrap; background-color:rgb(245,245,245)">I feel I am quite lost. </pre>
<pre class="gmail-code gmail-matlab" style="overflow:auto; font-family:Menlo,Monaco,Consolas,"Courier New",monospace; padding:9.5px; margin-top:0px; margin-bottom:10px; line-height:1.42857; word-break:break-all; word-wrap:break-word; color:rgb(51,51,51); border:1px solid rgb(204,204,204); white-space:pre-wrap; background-color:rgb(245,245,245)">Best,</pre>
<pre class="gmail-code gmail-matlab" style="overflow:auto; font-family:Menlo,Monaco,Consolas,"Courier New",monospace; padding:9.5px; margin-top:0px; margin-bottom:10px; line-height:1.42857; word-break:break-all; word-wrap:break-word; color:rgb(51,51,51); border:1px solid rgb(204,204,204); white-space:pre-wrap; background-color:rgb(245,245,245)">Tianyang</pre>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>