filename = 'leika.txt'; fp = fopen(filename,"r"); i = 0; while ~feof(fp) i = i + 1; for j = 1 : 4 zb(i,j)=fscanf(fp,'%f',1); end end fclose(fp);