Error using HD_Nod_Inf (line 7)
Invalid file identifier. Use fopen to generate a valid file identifier.
function Cal_water_cont = HD_Nod_Inf(filename_HD)
% Read the values in "Nod.out" file
filename_Nod_sub = sprintf('%s%s',filename_HD,"\Nod.out");
fidin_Nod_sub=fopen(filename_Nod_sub,'r+');
Line_nod_sub=0;
while ~feof(fidin_Nod_sub)
Line_nod_sub=Line_nod_sub+1;
newtline_Nod_sub{Line_nod_sub}=fgetl(fidin_Nod_sub);
end
fclose(fidin_Nod_sub);
for i=1:199
k = i + Line_nod_sub-1-199;
Cal_cont(i,1:22) = str2num(newtline_Nod_sub{k});
end
end