<div dir="ltr">Thanks for your prompt help, Eugenio and Stephen !!!<div>I can view the data with Eugenio's code w MATLAB2018a. I'll continue to work from there.</div><div><br></div><div>@Stephen: I build a small hardware piece that can capture multimodal biosignal and integrate this into some wearable prototypes.<br></div><div><br></div><div>Sincerely,</div><div>Tony</div><div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Nov 30, 2018 at 10:25 AM Eugenio Abela <<a href="mailto:abela.eugenio@gmail.com" target="_blank">abela.eugenio@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hi Tony<div><br></div><div>Here’s a pretty quick and dirty fix - have a careful look to make sure it does what you want. You need FieldTrip installed and in the path; it works on my MATLAB2016a. Others on the list might have better ideas, or spot obvious errors.</div><div><br></div><div>Good luck</div><div>eugenio</div><div><br></div><div><div style="margin:0px;font-size:10px;line-height:normal;font-family:Courier;color:rgb(37,153,45)">% Import you data</div><div style="margin:0px;font-size:10px;line-height:normal;font-family:Courier;color:rgb(178,69,243)"><span style="color:#000000">D = importdata(</span>'Pressure_3_6.txt'<span style="color:#000000">,</span>' '<span style="color:#000000">);</span></div><p style="margin:0px;font-size:10px;line-height:normal;font-family:Courier;min-height:12px"> <br class="m_-190213191356912096m_-4577953610220595590webkit-block-placeholder"></p><div style="margin:0px;font-size:10px;line-height:normal;font-family:Courier;color:rgb(37,153,45)">% Fill in FieldTrip data structure (check out ft_datatype_raw)</div><div style="margin:0px;font-size:10px;line-height:normal;font-family:Courier;color:rgb(37,153,45)">% I assume columns 4, 5 are EEG, 6,7 EMG.</div><div style="margin:0px;font-size:10px;line-height:normal;font-family:Courier;color:rgb(37,153,45)">% Channels go in rows, time in columns.</div><div style="margin:0px;font-size:10px;line-height:normal;font-family:Courier">data = struct();</div><div style="margin:0px;font-size:10px;line-height:normal;font-family:Courier;color:rgb(178,69,243)"><span style="color:#000000">data.label = {</span>'EEG-1'<span style="color:#000000">;</span>'EEG-2'<span style="color:#000000">;</span>'EMG-1'<span style="color:#000000">;</span>'EMG-2'<span style="color:#000000">};</span></div><div style="margin:0px;font-size:10px;line-height:normal;font-family:Courier">data.fsample = 250;</div><div style="margin:0px;font-size:10px;line-height:normal;font-family:Courier">data.time = {1:length(D)};</div><div style="margin:0px;font-size:10px;line-height:normal;font-family:Courier">data.trial = {D(:,4:7)’};</div><p style="margin:0px;font-size:10px;line-height:normal;font-family:Courier;min-height:12px"> <br class="m_-190213191356912096m_-4577953610220595590webkit-block-placeholder"></p><div style="margin:0px;font-size:10px;line-height:normal;font-family:Courier;color:rgb(37,153,45)">% Check out how it looks</div><div style="margin:0px;font-size:10px;line-height:normal;font-family:Courier">cfg = [];</div><div style="margin:0px;font-size:10px;line-height:normal;font-family:Courier">cfg.viemode = <span style="color:#b245f3">'vertical'</span>;</div><div style="margin:0px;font-size:10px;line-height:normal;font-family:Courier">ft_databrowser(cfg,data);</div><div><br></div><div><br></div><div><br></div><div><div>On 29 Nov 2018, at 17:22, Hoang Truong <<a href="mailto:Hoang.Truong@colorado.edu" target="_blank">Hoang.Truong@colorado.edu</a>> wrote:</div><br class="m_-190213191356912096m_-4577953610220595590Apple-interchange-newline"><div><div dir="ltr">Dear community,<div><br></div><div>This is Tony, from CS Department, University of Colorado Boulder. I am new to eeg analysis and fieldtrip. Currently I work on recording eeg and emg data using our own hardware with 2 eeg and 2 emg channels respectively. </div><div>Since we use our custom hardware, the data are saved in a simple format of txt file with 7 columns (example data on Dropbox: <a href="https://www.dropbox.com/s/30yzafa7ukg8xhl/Pressure_3_6.txt?dl=0" target="_blank">link</a>): 3 first columns are data from environment sensors, the next 4 are eeg and emg data (250Hz sampling rate, 42s recording)</div><div>I would like to ask what will be a proper way for me to import this data into fieldtrip. I checked the faq about importing custom data but I do not understand how to make custom readheader, readdata and readevent function.</div><div>Any help would be appreciated (suggestions, code examples, etc).</div><div>Thank you so much.</div><div><br></div><div>Sincerely,</div><div>Tony</div><div><br></div></div>
_______________________________________________<br>fieldtrip mailing list<br><a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br><a href="https://doi.org/10.1371/journal.pcbi.1002202" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a><br></div></div><br></div></div></blockquote></div>