Print

Print


Dear Vladimir

 

I’ve struck a problem computing and average reference using  spm_eeg_reref_eeg.m (latest SPM12 version) using a bdf file where only some of the channels had the channel labels recognised by SPM.

 

I fixed the channel label issue by renaming the chanlabels , setting the chantype to ‘EEG; and setting the correct electrode coordinates using:

    D = chanlabels(D, 67:98, new_elec);

    D = chantype(D, 67:98, 'EEG');

    D = coor2D(D, [], elec_Coords);

 

This data looks as expected and worked fine when then setting defaulteegsens using  spm_eeg_prep.m - but then when I try to set an average reference I get the following error:

 

 

SPM12: spm_eeg_montage (v6398)                     12:38:00 - 24/09/2016

========================================================================

Error using ft_scalingfactor (line 182)

cannot convert V to unknown

 

Error in ft_scalingfactor (line 94)

  factor = cellfun(@ft_scalingfactor, old(:), new(:));

 

Error in ft_apply_montage (line 309)

  scale = ft_scalingfactor(input.chanunit, montage.chanunitorg);

 

Error in spm_eeg_montage (line 361)

                    sens = ft_apply_montage(sens, sensmontage, 'keepunused', keepunused);

 

Error in spm_eeg_reref_eeg (line 98)

D = spm_eeg_montage(S1);

 

 

So not sure what I’m doing wrong but any advice much appreciated!

 

Cheers

            -bill