Error using evalc Unrecognized function or variable 'edfmex'.
9 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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!
0 commentaires
Réponse acceptée
Neha
le 26 Juin 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!
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Web Services dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!