Effacer les filtres
Effacer les filtres

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 vue (au cours des 30 derniers jours)
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);

Réponses (1)

Walter Roberson
Walter Roberson le 6 Sep 2022
You should be saving the output of the inputdlg() call. This will be a cell array of character vectors so for numeric work str2double()

Catégories

En savoir plus sur Structures dans Help Center et File Exchange

Produits


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by