Reputation: 87
I have a MatLab function in which I have a for-loop that make a call in every iteration to an external function from a library.
Unfortunately this function produces a hundred lines of console output on every call and my for-loop (parfor to be precise) has a number of iterations in the order of 10k-100k!
So I am addressing basically 2 problems:
The first problem is the most annoying at the moment but I would like to solve both.
I am wondering if there is a way to prevent a function to produce text output.
Upvotes: 0
Views: 168
Reputation: 36710
There are two possibilities:
private
folder next to the function and place an empty function fprintf
(or whatever is used to print) inside. This way you are overwriting the build-in function with a new one simply doing nothing.evalc
to run the function. Upvotes: 2