<div dir="ltr"><div>Hi Jan-Mathijs,</div><div>Thank you very much for your reply.</div><div><br></div><div>I found a mistake of mine in the data export. I didn't export it as ".dat" binary file. I was exporting it as text file. Now, the same script I sent in the first email is working in the sense that the program is properly recognizing the samples in the data (the 797740 sampling points, instead of only 80). Nevertheless, I still have a problem with the channel's resolution. </div>
<div><br></div><div>I saw that when exporting the binary files as ieee 32-bit floating, the resolution of the channels is not recorded in the header. So I changed it to the "32-bit signed integer" format, and now I have the resolution (in the header, it appears as "Ch1=AF3,NewRef,4.1322874E-08,µV", under "Channel Infos"), but then, another error message is returned:</div>
<div><br></div><div>??? Error using ==> read_brainvision_eeg at 155</div><div>unsupported sub-fileformat</div><div><br></div><div>I tried to export the data in different ways, but the error persists.</div><div><br></div>
<div>I am afraid there is something else wrong in the way I am exporting the data. Could you tell me how I must export the data, or just show me where I can find more detailed specifications about it? I searched through the site and mailing list, and haven't find further information about it.</div>
<div><br></div><div style>Thanks again,</div><div style>Best wishes,</div><div style>Ricardo</div><div style><span><br></span></div><div style><span><br></span></div>
<div><span><br>
</span></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 14 February 2013 16:12, Ricardo Moura <span dir="ltr"><<a href="mailto:ricardoojm@gmail.com" target="_blank">ricardoojm@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">Dear all,<div><br></div><div>I am very new to fieldtrip and I am experiencing a problem when reading brainvision data. I searched in the mailinglist archives but I didn't find anything that could help me. In case there is information about it somewhere else, I would appreciate if someone can send me a reference.</div>

<div><br></div><div>The problem is the following. I am tring to read continuous data from the brainvision analyzer (already preprocessed), but I always have an error which seems to be due to a problem with the identification of the channels resolution. I exported the data from brainvision in ".dat" vectorized format, and I am loading it first with the ft_preprocessing command.</div>

<div><br></div><div>Here is the command I am running to load it:</div><div><div>cfg = [];</div><div>cfg.dataset = 'Raw Data Inspection.dat';</div><div>eegData = ft_preprocessing(cfg)</div><div>
<br></div><div><br></div><div>Then the following warning message is returned, for each of the 56 channels I have in the data:</div><div><div>Warning: Unknown resolution for channel 55 in Raw Data Inspection.vhdr! </div>
<div>> In fileio\private\read_brainvision_vhdr at 50</div><div>  In ft_read_header at 381</div><div>  In ft_preprocessing at 394</div></div><div><br></div><div><br></div><div>And at the end, I have the following error:</div>

<div><div>??? Index exceeds matrix dimensions.</div><div><br></div><div>Error in ==> read_brainvision_eeg at 150</div><div>    dat(chan,:) = tmp(begsample:endsample);</div><div><br></div><div>Error in ==> ft_read_data at 400</div>

<div>    dat = read_brainvision_eeg(filename, hdr.orig, begsample, endsample, chanindx);</div><div><br></div><div>Error in ==> ft_preprocessing at 573</div><div>      dat = ft_read_data(cfg.datafile, 'header', hdr, 'begsample', begsample, 'endsample', endsample, 'chanindx', rawindx,</div>

<div>      'checkboundary', strcmp(cfg.continuous, 'no'), 'dataformat', cfg.dataformat) </div></div></div><div><br></div><div><br></div><div>Interestingly, when I read the header file with the "hdr = ft_read_header('Raw Data Inspection.vhdr')", it says that I have only 80 samples in the data. When checking the header file with the notepad, it says that there are actualy 797740 data points.</div>

<div><br></div><div>So, am I realling doing it right?</div><div>Thank you very much in advance, and best wishes,</div><div>Ricardo</div></div>
</blockquote></div><br></div>