topoplotER shows error message

Robert Oostenveld r.oostenveld at FCDONDERS.RU.NL
Tue Dec 13 11:24:40 CET 2005

Dear Pejman

Thanks for reporting the bug. The "dist" function seems to be missing
in the ftp version of fieldtrip/private. Since there is also a "dist"
function in the neural networks toolbox that works exactly the same,
I (and probably other users as well) did not notice the function to
be missing.

Please find the function attached, put it in the fieldtrip/private
subdirectory. I will also include it in the next ftp release.

best regards,

-------------- next part --------------
A non-text attachment was scrubbed...
Name: dist.m
Type: application/octet-stream
Size: 609 bytes
Desc: not available
URL: <>
-------------- next part --------------

On 13-dec-2005, at 4:09, Sehatpour, Pejman wrote:

> Hi,
> I am going through the tutorial for "event related averaging" and
> everything worked well untill I got to plotting the topographic
> distribution using the topoplotER.
> At this point when I enter the command which is in the tutorial, I
> get an error message as follows:
> cfg = [];
> cfg.xlim = [0.3 0.5];
> topoplotER(cfg,avgFIC)
> creating layout for ctf151 MEG system
> ??? Undefined command/function 'dist'.
> Error in ==> work\private\createlayout at 100
>     d = dist(prj');
> Error in ==> topoplotER at 184
>   lay = createlayout(data.grad);
> Could someone please tell me what this error is? and how it should
> be corrected?
> The topoplotER version that I am using is from today 12/12/05
> Thanks,
> Pejman.

More information about the fieldtrip mailing list