MATLAB: Does the function call “function [hdr, record] = edfReadOddur( ‘tinnaprim​e.edf’,var​argin )” give an error

edferror messageunexpexted matlab expression

This is the error message:
Error: File: edfReadOddur.m Line: 1 Column: 40 Unexpected MATLAB expression.

Best Answer

Oddur - if your function signature (the first line in edfReadOddur.m) is written as
function [hdr, record] = edfReadOddur( 'tinnaprime.edf',varargin )
then the problem is that you are trying to set the first parameter of your function as a string rather than as an input parameter/variable. Your signature should be defined as
function [hdr, record] = edfReadOddur( filename, varargin)
and you would call the above (from the command line or another piece of code) and pass in 'tinnaprime.edf' to populate/set the filename parameter
>> edfReadOddur('tinnaprime.edf')
See Function Basics for more details.