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!