How can I prompt user to press some key on keyboard let us say 'c' in order to continue the program
Afficher commentaires plus anciens
clc
clear all
fprintf('Following assumptions are assumed duing execution of program \n1. Fixed cost in establishing the warehouse is constant for all the warehouses. \n2. cost of production is also same for all manufacturing plants./n')
%%BEFORE THE MATLAB ASKS FOR AN INPUT FOR VARIABLE 'M' I WISH TO ASK IT TO PRESS A KEY IN ORDER TO CONTINUE
M = input('Number of Manufacturing plants: ');
Réponse acceptée
Plus de réponses (1)
Image Analyst
le 1 Nov 2014
Modifié(e) : Image Analyst
le 1 Nov 2014
%some code
pause; % Wait for user to type any key
% code resumes.
Or for a GUI way:
%some code
msgbox('Click OK to continue'); % Wit for user to click OK button.
% code resumes.
1 commentaire
Abhinav
le 1 Nov 2014
Catégories
En savoir plus sur Entering Commands dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!