I have read several posts here and in other forums to understand how to do hide the output of a function on the command window. Generally, the answer is: "use evalc".
Today I posted another question for a different issue (Memory issue with Matlab: update variable in .mat) and a user showed me why it is always better to avoid the usage of eval/evalc (How to put these images together?).
What if I want to avoid evalc but I want to hide the output of a function from the command windows? Is it possible to do it?
EDIT:
I don't think it is a duplicate.
As said in the introduction there are several posts (also here in stack overflow) that address this question. But (including the post which should be a duplicate of this question: Suppressing a function's command window output ) the main answer is to use evalc, which as written in the title, I don't want to use. Also, as written in the link above, using a private disp might be risky, it is not going to suppress outputs resulting from fprintf or from a missing semicolon (creating also a private fprintf would hide also some output string that I want to have).