MATLAB: Character String and Variables

character strings

Is there a way to call variables inside of a character string? What I would like to do is below:
Take the character string BOO and attached the numbers 1-30 based on a for loop so I get the following in character format
BOO1 BOO2 BOO3 … BOO30
Where BOO is nothing but a string of characters.

Best Answer

sprintf('BOO%d ',d)