Error using evalc Unrecognized function or variable 'edfmex'.

1 visualización (últimos 30 días)
Qianhui
Qianhui el 22 de Jun. de 2023
Respondida: Neha el 26 de Jun. de 2023
Hi I am trying to use a batchFileConverter function to convert edf to .m file format.
function batchFileConverter_Dataset1()
sourceFolderName = './rawData/';
destFolderName = './matlabData/';
rawFiles = dir([sourceFolderName '*.edf']);
nFiles = length(rawFiles);
% Disp file information:
printToConsole('L1');
printToConsole(1, 'Processing %i files...\n', nFiles);
% Loop through files:
for fileIndx = 1:nFiles
edfDataConverter([sourceFolderName rawFiles(fileIndx).name]...
,[destFolderName rawFiles(fileIndx).name(1:end-4) '.mat'])
printToConsole(2, 'Done with file %i.\n',fileIndx);
end
printToConsole(2, 'Done with folder.\n');
printToConsole('L2');
end
%% edfDataConverter Function:
function edfDataConverter(edfFilename,matFilename)
% edfDataConverter Converts a single edf file to a matlab file.
% Read raw edf file:
hMex = @edfmex; %#ok<NASGU>
[~,rawEDF] = evalc(['edfmex(''' edfFilename ''');']);
The errors are:
Unrecognized function or variable 'printToConsole'.
Error in batchFileConverter_Dataset1 (line 49)
printToConsole('L1');
Error using evalc
Unrecognized function or variable 'edfmex'.
Error in batchFileConverter_Dataset1>edfDataConverter (line 71)
[~,rawEDF] = evalc(['edfmex(''' edfFilename ''');']);
Can someone tell me how to solve this problem? Thank you!

Respuesta aceptada

Neha
Neha el 26 de Jun. de 2023
Hi Qianhui,
I understand that you are facing errors about the unrecognized functions: "printToConsole" and "edfmex".
Since the code is from this GitHub repository: Pupil Size, these are helper functions added by the developer and are not built-in MATLAB functions.
I suggest you load the all the other files in this repository and then try to execute the script. You should not be facing any errors thereafter.
I hope this helps!

Más respuestas (0)

Categorías

Más información sobre EEG/MEG/ECoG en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by