The reason for the specific behavior mentioned in the question is to call FILEprintf fprintfwith a storage variable:
nbytes = fprintf(___) , fprintf , .
, , disp(fprintf(...)) fprintf , disp fprintf, , .
, , STRINGprintf: sprintf:
disp(sprintf('Hi %i all of you',2))
Hi 2 all of you
, , sprintf , , .., fprintf .
str = sprintf(formatSpec,A1,...,An) A1,..., An formatSpec str.
fprintf(fileID,formatSpec,A1,...,An) formatSpec A1,... An . fprintf , fopen.
fprintf(formatSpec,A1,...,An) .
, disp(sprintf()) fprintf , , sprintf, , fprintf.