<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Dear Stephen,<div><br></div><div>this is a known problem with the loadavg() function. I suggest you modify the loadavg.m function directly and send us an updated version with microvolt scaling. Ideally, there would be an input parameter that would indicate if the user wants the data converted to microvolt or not.</div><div><br></div><div>Best,</div><div><br></div><div>Arno</div><div><br><div><div>On May 17, 2011, at 7:52 PM, Stephen Politzer-Ahles wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hello all,<br><br>I am using loadavg() to import Neuroscan average files for some simple processing in MATLAB, and I would like to scale the imported data back into microvolts (so that I can compare the data I'm working with in MATLAB against data processed in Neuroscan, which represents data points in microvolts). Does anyone happen to have any sample code to do this? I found the following instructions in <a href="http://sccn.ucsd.edu/eeglab/allfunctions/loadavg.m">http://sccn.ucsd.edu/eeglab/allfunctions/loadavg.m</a> :<br>
<br><blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote"><pre>% Average data is stored as 4-byte floats in vectored format for each<br>% channel. Each channel has a 5-byte header that is no longer used. Thus,<br>
% after the main file header, there is an unused 5-byte header followed by<br>% erp.pnts of 4-byte floating point numbers for the first channel; then a<br>% 5-byte header for channel two followed by erp.pnts*sizeof(float) bytes,<br>
% etc. Therefore, the total number of bytes after the main header is:<br>% erp.nchannels * (5 + erp.pnts*sizeof(float)). To scale a data point to<br>% microvolts, multiply by the channel-specific calibration factor (i.e., for<br>
% electrode j: channel[j]->calib) and divide by the number of sweeps in the<br>% average (i.e., channel[j]->n).<br></pre><br clear="all"><br></blockquote><div>However, I don't know how to retrieve the necessary information (number of sweeps and calibration factor) when running loadavg(). The function outputs the number of sweeps in the MATLAB command window (from <span style="font-family: courier new,monospace;">fprintf('number of trials (s) : %d\n', nsweeps);</span>), but as far as I can tell that number isn't stored in a variable anywhere that I can access? Any advice would be greatly appreciated.<br>
<br>Thank you,<br>Stephen Politzer-Ahles<br><br> </div>-- <br>Stephen Politzer-Ahles<br>University of Kansas<br>Linguistics Department<br><a href="http://www.linguistics.ku.edu/">http://www.linguistics.ku.edu/</a><br>
_______________________________________________<br>Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html">http://sccn.ucsd.edu/eeglab/eeglabmail.html</a><br>To unsubscribe, send an empty email to <a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu">eeglablist-unsubscribe@sccn.ucsd.edu</a><br>For digest mode, send an email with the subject "set digest mime" to <a href="mailto:eeglablist-request@sccn.ucsd.edu">eeglablist-request@sccn.ucsd.edu</a></blockquote></div><br></div></body></html>