<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi again,<div>This is my question (I hope now would be much clear):</div><div>I am trying to do a "preprocessing and analysis of spike+local field potential data". I followed the tutorial and everything was nice and clear with your data.</div><div>However I found some issues with my own data.</div><div>My LFP data is a .mat file and I tranformed it into a  FT data structure. The only thing I don't have is the header (hdr), because the original recording came from a .dat file from Inomed recordings. Anyway, even without the header I am able to plot the data and to see it. </div><div>The spikes were sorted with wave_clus so here I don't have any issue, FT open it and I can work with them perfectly.</div><div><br></div><div>The step I am following are:</div><div>1) Read the LFP and spikes files with FT. No problem so far except for the header in the LFP file</div><div>2) Define trial and preprocessing of both files separately </div><div>3) read and select the spike</div><div>4)The first problem is here in: construct a cfg.trl matrix to preprocess the LFP. I can preprocess like a continuous data (1 column of voltages and the sampling freq):</div><div><div><br></div><div>load(fullfile(data_dir,'lfp.mat')); </div><div>        cfg = [];</div><div>        cfg.continuous  = 'yes';</div><div>        cfg.channel=lfp_FT.label;</div><div>        cfg.padding   = 10; </div><div>        cfg.dftfreq   = [50-1*(1/10):(1/10):50+1*(1/10) ]; % filter out 50 hz line noise</div><div>        cfg.bsfilter = 'yes';</div><div>      </div><div>data_lfp  = ft_preprocessing(cfg, lfp_FT); % read in the LFP</div></div><div><br></div><div>I tried many ways following the different tutorials and nothing works properly because even when FT let me ADD THE TRIAL INFORMATION "artificially" into my data_lfp, later on it would show me the </div><div>Error using ft_appendspike (line 112): <span style="color:rgb(34,139,34);font-family:"Courier New";font-size:13.3333px">could not find the trial information in the continuous data"</span><br></div><div> </div><div>I plot both files and the spikes match perfectly with the lfp data, so Matlab is reading them well, but I am doing something  wrong when I try to create the lfp FT structure.  </div><div><br></div><div>Thanks for your help,</div><div><br></div><div>Maria</div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El jue., 14 feb. 2019 a las 11:29, María Alejandra Korovaichuk (<<a href="mailto:alejandra.korovaichuk@ctb.upm.es">alejandra.korovaichuk@ctb.upm.es</a>>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;line-height:normal;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:forestgreen">Hi,</span></p>

<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;line-height:normal;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:forestgreen">I am trying to append LFP data (from a continous matlab file), with a
spike data (from wave_clus), into one large file to do some analysis.</span></p>

<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;line-height:normal;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:forestgreen">I tried many options but I always have the same error (Error using
ft_appendspike (line 112)</span></p>

<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;line-height:normal;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:forestgreen">could not find the trial information in the continuous data)</span></p>

<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;line-height:normal;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:forestgreen">I add all the requiered info manually in order to read it but there is
something missing I can't find.</span></p>

<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;line-height:normal;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:forestgreen">Any help is welcome, thanks!</span></p></div>
</blockquote></div>