How to display a variable value in a text box?
古いコメントを表示
Hello,
I have an inputdlg function to allow the user to introduce any value. How could I display the value of a variable in the "default" field of that function, which is shown in the text box?
Thank you.
3 件のコメント
Jan
2012 年 5 月 3 日
The question is not clear. Which "default" field in which textbox?
Christian
2012 年 5 月 3 日
Image Analyst
2012 年 5 月 3 日
See my answer.
採用された回答
その他の回答 (1 件)
Christian
2012 年 5 月 3 日
2 件のコメント
Image Analyst
2012 年 5 月 3 日
Just copy and paste and run. You'll see the default value of 45 is displayed in the text box where the user is supposed to type their answer. Isn't that what you want? Your code is almost like mine except that some variables (param, name) don't have names that accurately describe what they are, and you just have dot dot dot instead of actual values like I do. Any reason why you can't use my code and just replace the default value of 45 and the prompt with ones suitable for your situation?
Christian
2012 年 5 月 3 日
カテゴリ
ヘルプ センター および File Exchange で Title についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!