filename = 'leika.txt'; fp = fopen(filename,"r"); i = 0; zb=[]; while ~feof(fp) line = fgetl(fp) my = sscanf(line,'%g') end fclose(fp);