How to display a message when two conditions are met in GUI

2 visualizaciones (últimos 30 días)
David Armendáriz
David Armendáriz el 16 de Mzo. de 2018
Respondida: BhaTTa el 17 de Oct. de 2024
I have two sliders that modify two different functions. For example when slider1 takes the value 3 and the slider2 takes the value 5 I want to display a message. How can this be done?

Respuestas (1)

BhaTTa
BhaTTa el 17 de Oct. de 2024
Hey @David Armendáriz, you can make use of MATLAB App Designer to design the requirements provided.
Please follow the below steps to design the gui.
  1. Drag and Drop 2 'Sliders' into the gui
  2. Add callback for each sliders
  3. Add a logic so that whenever the value of slider changes it compares with other sliders value and if it meets the above requirements it displays the message.
I have implemented and attahced the screenshots of the app view and the design view:
Design View:
Code View:
Hope it helps.

Categorías

Más información sobre Develop Apps Using App Designer en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by