Dialog box with variable and button

4 vues (au cours des 30 derniers jours)
UCL
UCL le 14 Fév 2013
I would like to create a dialog box which will have variables in it and a button: for example:
Today you have : 5 pounds (5 is the variable) Buy food? (Buy food is the button)
Thank you in advance
  1 commentaire
Jan
Jan le 14 Fév 2013
What is your question? What have you tried so far, which problems occurred and which kind of help do you need?

Connectez-vous pour commenter.

Réponse acceptée

Sean de Wolski
Sean de Wolski le 14 Fév 2013
x = 5;
questdlg(sprintf('You have %dlb of food?',x),'Hungry Yet?','Buy Food','Starve Longer','Buy Food')

Plus de réponses (0)

Catégories

En savoir plus sur Thermal Analysis dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by