In the first case, you'll have to use
because the string class 'fmt' optional input is only recognized for datetime or duration arguments, not numbers.
num2str() accepts a trailing format string, but has some warts that have to be aware of -- to illustrate:
in the first case, if just take the wanted array row, the output of the row vector isn't three strings but only one because num2str isn't smart enough to be able to do other than just catenate the three strings in a row then return the smooshed-together char() string.
If you transpose and pass a column vector instead, then it uses strvcat() internally and you do get a char() array--but again, that's a char() array and so to use it you have to remember that each element in the array is just a single byte. It will also pad the shorter strings to the maximum length of any to retain rectangular array -- in this case that doesn't show up, in some cases the extra white space may be annoying if the usage doesn't automagically strtrim() the result.
In the second case, since you just have the single value, you can add the format string to str2num
xlabel(['my num is : ' num2str(my_num,'%0.2f')],'interpreter','latex')
NB: you don't need either the temporary variable to hold the string (although that may be convenient in more complicated cases) nor to call xlabel twice to pass the string and also set the interpreter property.
You can also avoid the catenation of the string by putting the literal text in the format string--
xlabel(num2str(my_num,'my num is: %0.2f'),'interpreter','latex')
See the doc for fprintf for all the skinny on formatting strings rules.