Why i’m getting this error
for i =1:N
fx =[ ‘C:UsersSC23M048-BABARMALIKMDownloadsAbaqusHierarchical compositeaax1jjx’ num2str(i) ‘.txt’];
fy =[ ‘C:UsersSC23M048-BABARMALIKMDownloadsAbaqusHierarchical compositeaay1jjy’ num2str(i) ‘.txt’];
fu =[ ‘C:UsersSC23M048-BABARMALIKMDownloadsAbaqusHierarchical compositeaau11jju1’ num2str(i) ‘.txt’];
fv =[ ‘C:UsersSC23M048-BABARMALIKMDownloadsAbaqusHierarchical compositeaau21jju2’ num2str(i) ‘.txt’];
x = textfile(fx);
y = textfile(fy);
z1 = textfile(fu);
z2 = textfile(fv);
U1 = griddata(x,y,z1,K1,K2);
U2 = griddata(x,y,z2,K1,K2);
zz1 = U1+zz1;
zz2 = U2+zz2;
i ;
end
Error using fscanf
Invalid file identifier. Use fopen to generate a valid file identifier.
Error in untitled>textfile (line 160)
value= fscanf(fileID,’%f’);
this is the error i’m gettingfor i =1:N
fx =[ ‘C:UsersSC23M048-BABARMALIKMDownloadsAbaqusHierarchical compositeaax1jjx’ num2str(i) ‘.txt’];
fy =[ ‘C:UsersSC23M048-BABARMALIKMDownloadsAbaqusHierarchical compositeaay1jjy’ num2str(i) ‘.txt’];
fu =[ ‘C:UsersSC23M048-BABARMALIKMDownloadsAbaqusHierarchical compositeaau11jju1’ num2str(i) ‘.txt’];
fv =[ ‘C:UsersSC23M048-BABARMALIKMDownloadsAbaqusHierarchical compositeaau21jju2’ num2str(i) ‘.txt’];
x = textfile(fx);
y = textfile(fy);
z1 = textfile(fu);
z2 = textfile(fv);
U1 = griddata(x,y,z1,K1,K2);
U2 = griddata(x,y,z2,K1,K2);
zz1 = U1+zz1;
zz2 = U2+zz2;
i ;
end
Error using fscanf
Invalid file identifier. Use fopen to generate a valid file identifier.
Error in untitled>textfile (line 160)
value= fscanf(fileID,’%f’);
this is the error i’m getting for i =1:N
fx =[ ‘C:UsersSC23M048-BABARMALIKMDownloadsAbaqusHierarchical compositeaax1jjx’ num2str(i) ‘.txt’];
fy =[ ‘C:UsersSC23M048-BABARMALIKMDownloadsAbaqusHierarchical compositeaay1jjy’ num2str(i) ‘.txt’];
fu =[ ‘C:UsersSC23M048-BABARMALIKMDownloadsAbaqusHierarchical compositeaau11jju1’ num2str(i) ‘.txt’];
fv =[ ‘C:UsersSC23M048-BABARMALIKMDownloadsAbaqusHierarchical compositeaau21jju2’ num2str(i) ‘.txt’];
x = textfile(fx);
y = textfile(fy);
z1 = textfile(fu);
z2 = textfile(fv);
U1 = griddata(x,y,z1,K1,K2);
U2 = griddata(x,y,z2,K1,K2);
zz1 = U1+zz1;
zz2 = U2+zz2;
i ;
end
Error using fscanf
Invalid file identifier. Use fopen to generate a valid file identifier.
Error in untitled>textfile (line 160)
value= fscanf(fileID,’%f’);
this is the error i’m getting help MATLAB Answers — New Questions