Print in Command Window without 'ans = ' in matlab?

command-window, matlab, printf

Solution

You can use `fprintf` instead of `sprintf`. Remember to put a newline `\n` at the end of your strings.

Problem

When I use sprintf, the results show like this : ``` sprintf('number=%d %d %d',a,b,c) sprintf('or %d',h) ans = number= 5 4 2 ans = or 2 ``` How can I display the results without `ans =` obstructing them ?

Original source