I have a mex file called in my MATLAB script. The mex function may take a while to run, so in order to prevent my code from "stopping there without any outputs", I put many printf
statements in the mex file to output some running information about the data being processed.
But when I call the mex function, it doesn't printf
anything and stays there during int's running. Finally, after finishing its work, it will printf
all the information I want -- NOT while it is running but after finishing. It's not what I want.
So I want to know how to make it not only printf
what I want but also printf
at the time I want it.