<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7651.53">
<TITLE>Problems using .elp files</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>Dear Fieldtrippers,<BR>
<BR>
I am using .avr files for source modelling on ERP data. From the ERP components, I have calculated the differencewaves in a .mat file. Until this it all went fine. However I get stuck at using .elp files.<BR>
I can succesfully create the headmodel with ft_prepare_singleshell(cfg,segementedmri) with the semi-realistic head model developed by Nolte (2003)<BR>
However when using ft_prepare_leadfield(cfg) I get problems.<BR>
<BR>
My code is like this:<BR>
<BR>
% discretize brainvolume in grid<BR>
cfg=[]<BR>
cfg.inputfile= 'C:\Users\Brian\Documents\MATLAB\AnalysisM\differencewave01'<BR>
[lbl] = importdata([subjectdata.subjectdir filesep subjectdata.electrodes]) % reading in .elp files<BR>
<BR>
%renaming lbl.textdata to lbl.label, else it gives an error at ft_channelselection, because it is unable to read sens.label<BR>
oldField = 'textdata';<BR>
newField = 'label';<BR>
[lbl.(newField)] = lbl.(oldField);<BR>
lbl = rmfield(lbl,oldField);<BR>
cfg.elec= lbl<BR>
cfg.vol            = vol;<BR>
cfg.reducerank      = 3;<BR>
cfg.channel         = 'Fz'<BR>
cfg.grid.resolution = 1;   % use a 3-D grid with a 1 cm resolution<BR>
save cfg<BR>
[grid] = ft_prepare_leadfield(cfg);<BR>
<BR>
When executing this I get the following commandscreen:<BR>
....<BR>
.....<BR>
using headmodel specified in the configuration<BR>
using electrodes specified in the configuration<BR>
??? Error using ==> ft_prepare_vol_sens at 110<BR>
the input does not look like EEG, nor like MEG<BR>
<BR>
Error in ==> prepare_headmodel at 114<BR>
[vol, sens] = ft_prepare_vol_sens(vol, sens, 'channel', cfg.channel, 'order', cfg.order);<BR>
<BR>
Error in ==> ft_prepare_leadfield at 159<BR>
[vol, sens, cfg] = prepare_headmodel(cfg, data);<BR>
<BR>
I think this is because I use .elp files? The .elp files contain N rows and 3 columns representing xyz or spherical coordinates I assume. However this is the only information I have about the electrodes, so I have to do with it.<BR>
<BR>
Any ideas?<BR>
<BR>
Kind regards,<BR>
<BR>
Brian<BR>
<BR>
<BR>
<BR>
</FONT>
</P>

<br clear=all> 
<html>
        <body>
        <p style="font-size:13px;font-family:arial;">
        
        Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629.<BR> The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629.<BR>
        </p>
        </body>
</html>

</BODY>
</HTML>