<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Nasser,<div><br></div><div>the read_eep_cnt() is a function to read CNT files from the ANT company not from Neuroscan. loadcnt is the correct function. This function is pretty stable, so if you have problem, it is likely that it comes from the writecnt function which is relatively unstable (and not part of EEGLAB per say).</div><div><br></div><div>An alternative method would be to write to EDF format using BIOSIG (swrite function) then open the EDF file under Neuroscan - I think Neuroscan can open EDF file but I am not sure as I have not used this software in a long time (of course you will loose in data resolution since EDF is 16-bit and CNT is currently 32). That's probably the best option.</div><div><br></div><div>Arno</div><div><br><div><div>On 12 janv. 09, at 11:17, Nasser Mourad wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Arial; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 14pt; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0in; "><span style="font-size: 10pt; color: black; font-family: 'Courier New'; ">Dear EEGlab group<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0in; "><span style="font-size: 10pt; color: black; font-family: 'Courier New'; "><o:p> </o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0in; "><span style="font-size: 10pt; color: black; font-family: 'Courier New'; ">I am trying to write a neuroscan continuous signal file (file_name.cnt)<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0in; "><span style="font-size: 10pt; color: black; font-family: 'Courier New'; ">using the function “writecnt.m”, and I followed the following steps:<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0in; "><span style="font-size: 10pt; color: black; font-family: 'Courier New'; "><o:p> </o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0in; "><span style="font-size: 10pt; color: black; font-family: 'Courier New'; ">1- cnt = loadcnt(file_name, 'scale', 'off', 'sample1', 0, 'blockread', 1,'ldnsamples', 1000);<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0in; "><span style="font-size: 10pt; color: black; font-family: 'Courier New'; ">2. cnt.endtag = cnt.tag;<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0in; "><span style="font-size: 10pt; color: black; font-family: 'Courier New'; ">3. writecnt(out_file_name,<span class="Apple-converted-space"> </span><span> </span>cnt, 'scale', 'off', 'sample1', 0, 'ldnsamples', 1000);<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0in; "><span style="font-size: 10pt; color: black; font-family: 'Courier New'; "><o:p> </o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0in; "><span style="font-size: 10pt; color: black; font-family: 'Courier New'; ">To this stage; it seems that every thing is working fine, but after that when I tried to read the data using eeglab or the command line function<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0in; "><span style="font-size: 10pt; color: black; font-family: 'Courier New'; ">[eeg] = read_eep_cnt(out_file_name,1,1000);<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0in; "><span style="font-size: 10pt; color: black; font-family: 'Courier New'; ">I get the following error message ”??? Error reading header from file”.<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0in; "><span style="font-size: 10pt; color: black; font-family: 'Courier New'; ">To me, it seems that the main problem comes from the matlab script “loadcnt.m”, that I used first to read the data, because by checking the size of the data set (size(cnt.data)) I found that the number of channels is 4201 instead of 129!!!!<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0in; "><span style="font-size: 10pt; color: black; font-family: 'Courier New'; "><o:p> </o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0in; "><span style="font-size: 10pt; color: black; font-family: 'Courier New'; ">Any idea what I have to do to fix that error?<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0in; "><span style="font-size: 10pt; color: black; font-family: 'Courier New'; ">Thanks in advance,<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0in; "><span style="font-size: 10pt; color: black; font-family: 'Courier New'; "><o:p> </o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0in; "><st1:place><span style="font-size: 10pt; color: black; font-family: 'Courier New'; ">Nasser</span></st1:place><span style="font-size: 10pt; color: black; font-family: 'Courier New'; "><o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0in; "><span style="font-size: 10pt; color: black; font-family: 'Courier New'; "><span> </span></span><span style="font-family: 'Courier New'; "><o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0in; "><span style="font-family: 'Courier New'; "><o:p><font size="3"> </font></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0pt; margin-left: 0in; "><o:p><font size="3"> </font></o:p></div></div></div><br><span><ATT00001.txt></span></div></span></blockquote></div><br></div></body></html>