Error in first line of edfread.m

2 ビュー (過去 30 日間)
Eline de Groot
Eline de Groot 2019 年 3 月 15 日
編集済み: Eline de Groot 2019 年 3 月 18 日
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?

採用された回答

Steven Lord
Steven Lord 2019 年 3 月 15 日
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.
  1 件のコメント
Eline de Groot
Eline de Groot 2019 年 3 月 18 日
編集済み: Eline de Groot 2019 年 3 月 18 日
Edit: It worked, thank you very much!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeEEG/MEG/ECoG についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by