<div dir="ltr">I'm having this issue as well, only with EEG data, and at resamplefs = 150. I've added '-refchan' to my cfg.channel for ft_componentanalysis, and also set path for EEGlab toolbox, but the issue persists. Any help would be greatly appreciated.<div>
<br></div><div>Thank you,</div><div>Max</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Nov 8, 2013 at 5:14 AM, Stephen Whitmarsh <span dir="ltr"><<a href="mailto:stephen.whitmarsh@gmail.com" target="_blank">stephen.whitmarsh@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Sendy, JM,<div><br></div><div>In addition, that error also happens (or used to, at least) when you have not selected MEG as channels, therefor applying ICA e.g. also on your EOG channels etc. as well.</div>
<div><br></div><div>Cheers,</div><div>Stephen</div><div><br></div><div><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On 8 November 2013 11:08, jan-mathijs schoffelen <span dir="ltr"><<a href="mailto:jan.schoffelen@donders.ru.nl" target="_blank">jan.schoffelen@donders.ru.nl</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><br></div><div>Hi Sendy,</div><div><br></div><div>You may want to have a look at the following link:</div>
<div><br></div><div><a href="http://fieldtrip.fcdonders.nl/faq/why_does_my_ica_output_contain_complex_numbers?s[]=component" target="_blank">http://fieldtrip.fcdonders.nl/faq/why_does_my_ica_output_contain_complex_numbers?s[]=component</a></div>
<div><br></div><div>I assume that your data has been passed through the MaxFilter, which massively reduces the rank of your data, causing the ICA algorithm to spit out complex valued numbers.</div><div>You need to reduce the rank of your data prior to running the component decomposition, to be less that then true rank in your data.</div>
<div><br></div><div>Best</div><div>Jan-Mathijs</div><div><div><br><div><div>On Nov 8, 2013, at 10:47 AM, Sendy Caffarra wrote:</div><br><blockquote type="cite"><div>Hi,<br><br><br>I'm using Fieldtrip to analyze my Meg data.<br>
Actually, I'm trying to reject ocular artifacts by using ICA.<br>I decreased the sample rate to 300 and I performed the ICA analysis as following:<br><br>cfg = [];<br>cfg.resamplefs = 300;<br>cfg.detrend = 'no';<br>
data_1_rspl = ft_resampledata(cfg, data_1);<br>%ICA<br>cfg = [];<br>cfg.method = 'runica';<br>comp = ft_componentanalysis(cfg, data_1_rspl);<br><br><br>It worked, but now when I try to visualize the different ICA components using:<br>
<br>cfg = [];<br>cfg.layout = 'neuromag306mag.lay'; % specify the layout file that should be used for plotting<br>cfg.viewmode = 'component';<br>ft_databrowser(cfg, comp);<br>
<br>I can see how the waves look like, but I cannot see the topographic distribution of them.<br><br>And Matlab gives me this error:<br><br>??? Error using ==> surf at 78<br>X, Y, Z, and C cannot be complex.<br><br>Error in ==> ft_plot_topo at 251<br>
h = surf(Xi-deltax/2,Yi-deltay/2,zeros(size(Zi)), Zi, 'EdgeColor', 'none', 'FaceColor',<br> shading);<br><br>Error in ==> ft_databrowser>redraw_cb at 1850<br> ft_plot_topo(chanx, chany, chanz, 'mask', ...<br>
<br>Error in ==> ft_databrowser at 671<br>redraw_cb(h);<br><br><br>Could you help me in solving this problem?<br>I also downloaded the latest version of fieldtrip but it still does not work.<br><br>Thanks for your help.<br>
<br>Sendy<br><br><br>Sendy Caffarra<br>Postdoctoral researcher BCBL<br><a href="http://www.bcbl.eu" target="_blank">www.bcbl.eu</a><br><br>_______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br></div></blockquote></div><br></div></div><div>
<div style="word-wrap:break-word"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<div>Jan-Mathijs Schoffelen, MD PhD </div><div><br></div><div>Donders Institute for Brain, Cognition and Behaviour, <br>Centre for Cognitive Neuroimaging,<br>Radboud University Nijmegen, The Netherlands</div><div><br></div>
<div>Max Planck Institute for Psycholinguistics,</div><div>Nijmegen, The Netherlands</div><div><br></div><div><a href="mailto:J.Schoffelen@donders.ru.nl" target="_blank">J.Schoffelen@donders.ru.nl</a></div><div>Telephone: <a href="tel:%2B31-24-3614793" value="+31243614793" target="_blank">+31-24-3614793</a></div>
<div><br></div><div><a href="http://www.hettaligebrein.nl" target="_blank">http://www.hettaligebrein.nl</a></div></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div>
</div>
<br></div><br>_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br></blockquote></div><br></div>