<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body><div><div style="font-family: Calibri,sans-serif; font-size: 11pt;">Hi Mats,<br><br>I recently submitted a bugfix to that function because the keyboard was not working. Now both should be working. Unfortunately, I could only test that on matlab 2015a. So it might be that it's not working on older versions. You could try a ft version from a week ago or so without the bugfix (and hence only mouse functionality). Could you let us know which version of matlab you're using?<br><br>Best,<br>-Wanja</div></div><div dir="ltr"><hr><span style="font-family: Calibri,sans-serif; font-size: 11pt; font-weight: bold;">Von: </span><span style="font-family: Calibri,sans-serif; font-size: 11pt;"><a href="mailto:eelke.spaak@donders.ru.nl">Eelke Spaak</a></span><br><span style="font-family: Calibri,sans-serif; font-size: 11pt; font-weight: bold;">Gesendet: </span><span style="font-family: Calibri,sans-serif; font-size: 11pt;">11.06.2015 13:04</span><br><span style="font-family: Calibri,sans-serif; font-size: 11pt; font-weight: bold;">An: </span><span style="font-family: Calibri,sans-serif; font-size: 11pt;"><a href="mailto:fieldtrip@science.ru.nl">FieldTrip discussion list</a></span><br><span style="font-family: Calibri,sans-serif; font-size: 11pt; font-weight: bold;">Betreff: </span><span style="font-family: Calibri,sans-serif; font-size: 11pt;">Re: [FieldTrip] error in ft_artifact_zvalue</span><br><br></div>Hi Mats,<br><br>Could you let me know what Matlab version you are using? And if the<br>error also occurs if you use an older version (e.g. 2012a or so<br>(simply use 'matlab2012a' at a DCCN mentat prompt))?<br><br>Cheers,<br>Eelke<br><br>On 11 June 2015 at 11:55, Es, M.W.J. van (Mats) <M.vanEs@donders.ru.nl> wrote:<br>> Hi, I just wanted to start processing my MEG data, but when I want to remove<br>> the artifacts using ft_artifact_zvalue I get an error.<br>> This is my code:<br>> % data is preprocessed already<br>> %% Find jump artifacts<br>> cfg = [];<br>><br>> % channel selection, cutoff and padding<br>> cfg.artfctdef.zvalue.channel = 'MEG';<br>> cfg.artfctdef.zvalue.cutoff = 20; % artifact threshold<br>> cfg.artfctdef.zvalue.trlpadding = 0;<br>> cfg.artfctdef.zvalue.artpadding = 0;<br>> cfg.artfctdef.zvalue.fltpadding = 0;<br>><br>> % algorithmic parameters<br>> cfg.artfctdef.zvalue.cumulative = 'yes';<br>> cfg.artfctdef.zvalue.medianfilter = 'yes';<br>> cfg.artfctdef.zvalue.medianfiltord = 9;<br>> cfg.artfctdef.zvalue.absdiff = 'yes';<br>><br>> % make the process interactive<br>> cfg.artfctdef.zvalue.interactive = 'yes';<br>><br>> [~, artifact_jump] = ft_artifact_zvalue(cfg, data);<br>><br>> I do get the interactive figure where I can scroll through the trials and I<br>> can adjust the threshold, but when I use my mouse (e.g. to click on<br>> 'threshold'), I get the following error:<br>><br>> Attempt to reference field of non-structure array.<br>><br>> Error in ft_artifact_zvalue>keyboard_cb (line 701)<br>> curKey=eventdata.Key;<br>><br>> Error using waitfor<br>> Error while evaluating uicontrol Callback<br>><br>> It seems like my mouse isn't recognized (tried different USB ports). Can you<br>> help me? (PS: scrolling through trials with the keyboard is working).<br>><br>> Best,<br>> Mats<br>_______________________________________________<br>fieldtrip mailing list<br>fieldtrip@donders.ru.nl<br>http://mailman.science.ru.nl/mailman/listinfo/fieldtrip<br></body></html>