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

 採用された回答

Honglei Chen
Honglei Chen 2012 年 3 月 20 日

0 投票

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeEntering Commands についてさらに検索

製品

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by