To sprintf a string plus an integer in MATLAB, you can use the following format:
main.m39 chars2 lines
Here, string is the string you want to format with the integer integer. %i is a format specifier that indicates where in the string the integer should be inserted.
For example, if you want to sprintf the string "value is 5", where 5 is an integer variable, you can write:
main.m46 chars3 lines
The resulting result string would be 'value is 5'.
gistlibby LogSnag