I have a Discontinuous Prompt: That is, after a user input in the first message box, there is still a need to input the same in the Command Window. How to fix?
1 次查看(过去 30 天)
显示 更早的评论
Here is my code, but it is discontinuous. That is, after a user input in the first message box, there is still a need to input the same in the Command Window. How can I fix this?
prompt="Enter Number of Factors ";
inputdlg(prompt);
x=input(prompt);
n = x;
questions = "Enter the level for Factor " + (1:n);
inputdlg(questions);
0 个评论
回答(1 个)
Walter Roberson
2022-9-6
You should be saving the output of the inputdlg() call. This will be a cell array of character vectors so for numeric work str2double()
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Structures 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!