how do you print the counter value in an input statement?

How do you print the counter value in an input statement? Below is what I have tried. As is, it prints an empty box.
example:
for k = 1:value
s(1,k) = input(['please enter wall #',k,' U-factor: ']);
end

 Réponse acceptée

Use sprintf, e.g.,
input(sprintf('please enter wall #%d U-factor:',k))

Plus de réponses (0)

Catégories

En savoir plus sur Programming dans Centre d'aide et File Exchange

Produits

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by