Error in first line of edfread.m
2 views (last 30 days)
Show older comments
Eline de Groot
on 15 Mar 2019
Edited: Eline de Groot
on 18 Mar 2019
Hi,
I was trying to use the script edfread (https://nl.mathworks.com/matlabcentral/fileexchange/31900-edfread), but I get the following error:
Error: File: edfread.m Line: 1 Column: 34
Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.
In the first line of the script I put the .edf file (my file is called Pseudo.edf) in like this: function [hdr, record] = edfread('Pseudo.edf', varargin)
Could someone please tell me what I do wrong/where the error might be coming from?
0 Comments
Accepted Answer
Steven Lord
on 15 Mar 2019
Leave the first line of the function in the declaration as the following:
function [hdr, record] = edfread(fname, varargin)
When you call the function, call it with the name of your file as input.
[hdr, record] = edfread('Pseudo.edf'
Follow the file name with nothing but the closing parenthesis, the 'assignToVariables' name/value pair, and/or the 'targetSignals' name/value pair as shown in the examples in the edfread.m help text.
More Answers (0)
See Also
Categories
Find more on EEG/MEG/ECoG in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!