http://www.chemie.fu-berlin.de/chemnet/use/info/octave/octave_22.html
pct = 37;
filename = "foo.txt";
printf ("Processing of `%s' is %d%% finished.nPlease be patient.n",
filename, pct);
produces output like
Processing of `foo.txt' is 37% finished.
Please be patient.