c++ - how can I make a mex function printf while it's running? -
There is a max file in my MATLAB script, it may take a while to run Max Function, so my code is "without To prevent "any remaining output", I put too many But when I call the Max function, it does not do anything like So I want to know how to not only make it Yes, If you think that unappealing, you can create a macro which makes both calls: This diversified macro uses printf statements in the Max file, which produces some running information about the data being processed.
printf and it remains there while the int is running. Finally, after the completion of your work, this
printf all the info I would like - it's not going to be, but after finishing This is not what I need.
printf , but whenever I want it
printf it.
mexPrintf is what you need but note that the command window The buffer does not flush with force to use it, often it's too late before your message is printed. This happens if you start heavy computation after calling
mexPrintf . After each call for
mexEvalString ("outow;")
mexPrintf
#define printfFnc (...) {mexPrintf (__VA_ARGS__) ; MexEvalString ("delo;");}
__VA_ARGS __ . It can not be a part of the standard, but it appears in GCC and Visual C ++ just call
printfFnc like you
printf (or
mexPrintf ).
Comments
Post a Comment