You want to use sprintf() because it does not print to the command window, but then you want to print the result to the command window?? Seems like a contradiction, unless you are formatting the text in advance getting it ready for display.
To display a character vector to the command window without ans= you can disp() it, or you can fprintf('%s\n', TheVector)