Error trying to get started with get_chanlocs plugin for EEGLAB "Unrecognized function or variable 'placeFiducials'"

Hello,
I am very new to MATLAB, so apologies in advance if this is a trivial question. My university has recently acquired a Structure Sensor 3 scanner, and we would like to use the 3D models to conduct source localisation. It looks like get_chanlocs is the perfect tool to get the locations of the channels on the 3D models, but I am running into issues when trying to open the models in EEGLAB.
After importing my EEG data (.bdf file, from a Biosemi system, 64 channels), I use the "Locate electrodes in a 3D head image" option. First, I am prompted to select my 3D model, where I choose the .obj file created with the 3D scanner. Then I am asked if I want to use a template; since I do not have one yet, I select "No, I will select locations in order". At this point, MATLAB gives me this error:
Unrecognized function or variable 'placeFiducials'.
Error in get_chanlocs (line 177)
fiducials = placeFiducials(head_surface);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I think it means there is a function (placeFiducials) that the script is trying to use, but cannot find. But I am not sure where this function should be located. Am I missing a plugin, or could this be an issue with version compatibility?
I am currently using:
- MATLAB R2025b
- EEGLAB 2025.1.0
- FieldTrip 20250106
Installed EEGLAB plugins:
- Biosig v3.8.4
- ERPLAB v12.10
- clean_rawdata v2.11
- ICLabel v1.7
- firfilt v2.8
- dipfit v5.6
- EEG-BIDS v10.3
- get_chanlocs v4
- NFT v2.2
Thanks in advance if anyone can help me with this.

Answers (1)

Hi,
I see that you're encountering errors related to the "placeFiducials" function. Please try the following troubleshooting steps to resolve the issue:
1) Verify the File Path:
Ensure that the placeFiducials file is included in your MATLAB path. You can check this by running:
which placeFiducials
If the output points to a MATLAB installation directory, the file is correctly added. If not, add the file to your path using:
addpath('path_to_the_file')
2) Refresh the Toolbox Cache:
Rehash the toolbox cache by running the following commands:
rehash toolboxcache
restoredefaultpath
3) Reinstall Plugins:
If the above steps don’t resolve the problem, try reinstalling the plugins you mentioned to see if that fixes the issue.

3 Comments

Hello,
Thank you very much for your reply. I apologize for the delay in mine.
The issue is that I do not have the placeFiducials file. I think it is supposed to be a function of the get_chanlocs package, but it is nowhere to be seen. That is why I suspected a version incompatibility of some kind. I have tried reinstalling everything, but that did not solve the problem.
(Unfortunately I am not able to locate any placeFiducials matlab source code.)

Sign in to comment.

Categories

Find more on Get Started with MATLAB in Help Center and File Exchange

Products

Release

R2025b

Asked:

on 4 Oct 2025

Commented:

on 11 Nov 2025

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!