Function Reference
— Built-in Function: fprintf (fid, template, ...)

This function is just like printf, except that the output is written to the stream fid instead of stdout.