Fscanf tries to read whole file at once, but does output it along rows, hence your problem occurs. You could try other maneuvers, but this simple code assumes you know how big is your file
for ii=1:nNode
data(ii,:) = fscanf (inp, "%d %f %f" , [1,3])
end
fclose(inp)