Prompt user input for table inputdlg
16 ビュー (過去 30 日間)
古いコメントを表示
I have an issue:
I want an user defined input such as the "input" command in an m code file. But when i use the inputdlg and input a series of data it comes out as a
[11x4 char]
instead of a 11x1 variable that can be used in the rest of the code
I want the user to input a range of values from an excel sheet into the inputdlg and then that gets used in the rest of the code.
I hope this makes sense.
2 件のコメント
回答 (1 件)
Walter Roberson
2014 年 1 月 13 日
inputdlg() always returns a cell array of strings. You can use str2double() to parse each line if you are expecting exactly one value per line. See Example 2 in http://www.mathworks.com/help/matlab/ref/inputdlg.html
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!