Explanation

The syntax disp(sprintf('...')) calls two functions and requires memory allocation. However, the syntax fprintf('...\n') requires no memory and allows the code to execute faster.


Suggested Action

Replace disp(sprintf('...')) with fprintf('...\n'). You must include the new line character ('\n') to maintain behavior.