Hello,<br><br>I am doing realtime processing. <br><br>I wrote the following two simple codes:<br><br>cfg = [];<br>cfg.dataset = 'buffer://localhost:1972';<br>cfg.channel = {'A1'};<br>cfg.trialfun = 'trialfun_general';<br>
cfg.trialdef.eventtype = 'STATUS';<br>cfg.trialdef.eventvalue = 1;<br>cfg.trialdef.prestim = 0;<br>cfg.trialdef.poststim = 1;<br><br> ft_realtime_average(cfg)<br><br>And<br><br>cfg = [];<br>cfg.dataset = 'buffer://localhost:1972';<br>
cfg.channel = {'A1'};<br>cfg.trialfun = 'trialfun_general';<br>cfg.trialdef.eventtype = 'STATUS';<br>cfg.trialdef.eventvalue = 1;<br>cfg.trialdef.prestim = 0;<br>cfg.trialdef.poststim = 1;<br><br> ft_realtime_selectiveaverage(cfg)<br clear="all">
<br><br>In the first no error appeared but also I did not get a result (the generated figure was empty).<br><br>In the second I got the following message:<br><br>??? Error using ==> ft_read_data at 243<br>cannot read data before the begin of the file<br>
<br>Error in ==> ft_realtime_selectiveaverage at 94<br> dat = ft_read_data(cfg.datafile, 'header', hdr, 'begsample', begsample, 'endsample', endsample, 'chanindx', chanindx, 'checkboundary', false);<br>
<br>Error in ==> online2 at 10<br> ft_realtime_selectiveaverage(cfg) <br><br><br>Why I get so?<br><br>Thank you<br><br>-- <br>Hamza Fawzi Altakroury<br>Graduate student - MA<br>Faculty of Engineering and Natural Sciences<br>
Sabancı University<br>