How to open a dialogue when clicking on a push button in gui?

1 visualización (últimos 30 días)
Jihad Chamseddine
Jihad Chamseddine el 4 de Jul. de 2014
Respondida: Geoff Hayes el 4 de Jul. de 2014
I want to know if I click on a push button how to open a dialogue that will ask the user to enter some values (numbers)knowing that i will be able to enter the inputs that I want to in order to enter the numbers the user want. for example when i click the push button, I want a dialogue to open for example a list of three input options ( velocity , distance and mass for example) and ask to enter a number for each one and make a certain calculation if necessary.
hope you can help me because I really need it

Respuestas (1)

Geoff Hayes
Geoff Hayes el 4 de Jul. de 2014
In the callback function for your button, you can make use of the inputdlg function to display a dialog that will query the user for a number of inputs. See http://www.mathworks.com/help/matlab/ref/inputdlg.html for examples of dialogs with 1 or more inputs.

Categorías

Más información sobre Simulink Environment Customization en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by