what is the error 'Error using fscanf Invalid file identifier. Use fopen to generate a valid file identifier.'
조회 수: 1 (최근 30일)
이전 댓글 표시
after coding this
clear
clc
k=1:25:601;
for i=1:numel(k)
basefilename=sprintf('porosity_k%d',k(i));
fullfilename=fullfile(basefilename);
fileid= fopen(fullfilename,'r+')
A(:,i)=fscanf(fileid,'%f')
fclose(fileid)
end
B=cat(1,A(:,1),A(:,2),A(:,3),A(:,4),A(:,5),A(:,6),A(:,7),A(:,8),A(:,9),A(:,10),...
A(:,11),A(:,12),A(:,13),A(:,14),A(:,15),A(:,16),A(:,17),A(:,18),A(:,19),A(:,20),...
A(:,21),A(:,22),A(:,23),A(:,24),A(:,25));
i get this error
Error using fscanf Invalid file identifier. Use fopen to generate a valid file identifier
please help me why i get this error
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Low-Level File I/O에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!