<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>Dear Stephen,</p>
<p><br>
</p>
<p>It's works! Really thanks!! Nice start for the weekend :D</p>
<p><br>
</p>
<p>Kind regards,</p>
<p>Eva</p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Van:</b> Stephen Whitmarsh <stephen.whitmarsh@gmail.com><br>
<b>Verzonden:</b> vrijdag 1 oktober 2021 15:20:33<br>
<b>Aan:</b> FieldTrip discussion list<br>
<b>CC:</b> Eva Schlösser<br>
<b>Onderwerp:</b> Re: [FieldTrip] ft_selectdata</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div>Dear Eva,</div>
<div><br>
</div>
<div>I think you might be using ft_selectdata wrongly, although I would need to see the cfg's you are using to be sure;
<br>
</div>
<div><br>
</div>
<div>Something like this might work:</div>
<div>cfg = [];</div>
<div>cfg.channel = EEG_chan;<br>
</div>
<div>data2 = ft_selectdata(cfg, data);</div>
<div><br>
</div>
<div>Cheers,</div>
<div>Stephen</div>
<div><br>
</div>
<div><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">Op vr 1 okt. 2021 om 14:57 schreef Eva Schlösser via fieldtrip <<a href="mailto:fieldtrip@science.ru.nl">fieldtrip@science.ru.nl</a>>:<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">
<div id="gmail-m_-9099478778634294058divtagdefaultwrapper" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif" dir="ltr">
<p>Hi,</p>
<p><br>
</p>
<p>Hope you are doing well.</p>
<p><br>
</p>
<p>I am trying to select all the data with the label EEG from my channels from my .edf file and filter the other channels out (such as bloodpressure).  I tried to use to edf2fieldtrip function and then only select the channels which were needed. </p>
<p><br>
</p>
<p></p>
<div>data                 = edf2fieldtrip('myfile.edf'); </div>
<div>EEG_chan       = ft_channelselection({'EEG*'}, data.label); </div>
<div><br>
</div>
<div>I only want to use the EEG channels, however if I use ft_selectdata it only works if I use the whole data file and not the EEG_chan file. I think the problem lies in that the EEG channels aren't a 'struct'</div>
<div><br>
</div>
<div>-</div>
<div><br>
</div>
<div>
<div>data             = ft_selectdata(cfg, data); (works)</div>
<div><br>
</div>
<div><img size="6003" id="gmail-m_-9099478778634294058img767415" style="max-width: 99.9%;" aria-expanded="false" aria-haspopup="true" src="cid:17c3c0064d6f456b1e52"><br>
</div>
<div><br>
</div>
<div>data2           = ft_selectdata(cfg, EEG_chan; (does not work)</div>
<div><br>
</div>
<img size="5848" id="gmail-m_-9099478778634294058img18912" style="max-width: 99.9%;" aria-expanded="false" aria-haspopup="true" src="cid:17c3c0064d6f456b1e53"><br>
</div>
<div><img size="11087" id="gmail-m_-9099478778634294058img853361" style="max-width: 99.9%;" aria-expanded="false" aria-haspopup="true" src="cid:17c3c0064d5f456b1e51"><br>
</div>
<div>Hope you can help me,</div>
<div><br>
</div>
<div>Kind regards, </div>
<div>Eva</div>
<br>
<p></p>
</div>
</div>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<a href="https://doi.org/10.1371/journal.pcbi.1002202" rel="noreferrer" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a><br>
</blockquote>
</div>
</div>
</body>
</html>