フィルターのクリア

No file or directory error when trying to read in an edf file

4 ビュー (過去 30 日間)
Samuele Bolotta
Samuele Bolotta 2020 年 5 月 2 日
コメント済み: Samuele Bolotta 2020 年 5 月 2 日
When trying to read in an edf file with this code:
%Get the edf file
edf_name = uigetfile('*.edf') ;
string_compare = strcmp(strsplit(inputfile,'.'),strsplit(edf_name,'.'));
[info, data] = edfread(edf_name);
I receive the following error:
Error using edfread (line 125)
No such file or directory
Error in StimulusTestNew (line 29)
[info, data] = edfread(edf_name);
And these are the first lines of edfread:
function [hdr, record] = edfread(fname, varargin)
if nargin > 5
error('EDFREAD: Too many input arguments.');
end
if ~nargin
error('EDFREAD: Requires at least one input argument (filename to read).');
end
[fid,msg] = fopen(fname,'r');
if fid == -1
error(msg) %% this is line 125
end
How can I fix this?
Thanks!

採用された回答

KALYAN ACHARJYA
KALYAN ACHARJYA 2020 年 5 月 2 日
Please check the working directory, ensure that edf file present in the current working directory
  1 件のコメント
Samuele Bolotta
Samuele Bolotta 2020 年 5 月 2 日
Ah that was it. Stupid mistake. Thanks!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Import and Analysis についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by