The FPRINTF function returns an error if the fid value is specified as 0 in MATLAB 7.3 (R2006b). In previous releases we have used a file identifier value of 0 when it was necessary to suppress printing to the command window.
fprintf(1, 'I use this to supress printing to the Command Window\n')
produces an output:
I use this to supress printing to the Command Window
However, the statement:
fprintf(0, 'I use this to supress printing to the Command Window\n')
produces the following error:
??? Error using ==> fprintf Operation is not implemented for requested file identifier.
Best Answer