From: Chris on
I would like to display a changing variable in an input prompt and I'm having trouble doing that. I'm doing a simple analysis of tractive effort vs. velocity of an electric vehicle and I would like to have a user input labeling the number of gears. Following that I want to make a vector of gear ratios with a user input of each gear ratio with a statement saying "Gear X Ratio: " where X is the gear number. How can I do that?

gs=input('Number of Gears: ');
for x=1:gs
ig(x)=input('Gear x Ratio: ' );
end
From: Matt Fig on
['Gear ',num2str(x),' Ratio: ']