MATLAB: Using a variable in an input prompt

forinputprompt

I am trying to use the iterator (ii) of my for loop as a string in my input prompt. The code is shown below
for ii = 1:n
x = input('What is the orientation of molecule ' num2str(ii) 'in the x-direction?');
end
but this does not work. Any suggestions?

Best Answer

x = input(['What is the orientation of molecule ' num2str(ii) 'in the x-direction?']);