For fixed width content:
fopen() the file.
Loop:
fgetl() a line. If ~ischar() the line, break out of the loop. Pad the line with blanks to a multiple of the field width (if need be). Call that Lin. Then,
L_by_field = reshape(Lin, FieldWidth, []) .';
blankfield = all(L_by_field == ' ',2);
L_by_field(blankfield,end-2:end) = 'NaN';
fieldvalues = str2double(cellstr(L_by_field));
Store the values, then let the loop continue.
When the loop finishes, fclose() the file.