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일
Use sprintf, e.g.,
input(sprintf('please enter wall #%d U-factor:',k))

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Entering Commands에 대해 자세히 알아보기

제품

태그

질문:

2012년 3월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by