Error using ==> textscan Error
3 ビュー (過去 30 日間)
古いコメントを表示
Hi,
I keep receiving the following error: Error using ==> textscan First input cannot be empty with the following code:
function ceaContent = read_textfile(chrPath)
% initialize return-values
ceaContent = {};
try
%open textfile
fid = fopen(chrPath);
Direc = dir(chrPath);
ceaContent = textscan(fid, '%s', 'Delimiter', '\n', 'whitespace', '', 'bufsize', max(Direc.bytes, 4095));
ceaContent = ceaContent{0};
ceaContent = ceaContent(~ismember(strtrim(ceaContent), ''));
fclose(fid);
catch %#ok<CTCH>
try fclose(fid); end %#ok<TRYNC>
Thanks for the help!
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Text Data Preparation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!