MATLAB: Input prompt inputprompt how to make input function that displays text according to loop: i.e. for i=1:30 g=input('enter "/i/"th line'); end and it would display: enter 1th line enter 2th line enter 3th line etc….. Best Answer for i=1:30g=input(['enter ' int2str(i) ' th line']);end Related SolutionsMATLAB: Can text next to input be different in each loop Hi, Input can get prompt string as an input already. You can use both: promptString = 'Enter Height';for i = 1:5 x=input([promptString,' ', num2str(i),': ']); end%% OR %%promptString = 'Enter Height';for i = 1:5 x=input([promptString,' ', sprintf('%d',i),': ']); end MATLAB: User input folder name foldername = inputdlg('Please enter output folder name:'); mkdir(foldername{1}) Related QuestionHow can i print the value of a variable in the text that is to be displayed while asking for an inputHow do i prompt
Best Answer