How to ask to user if to run or not a part of code?

2 visualizaciones (últimos 30 días)
Giuseppe
Giuseppe el 20 de Jun. de 2021
Comentada: Giuseppe el 20 de Jun. de 2021
Hi guys, I'd like to show a GUI in which the user can select "yes" or "not" to reply to the answer "Do yo want to plot the 3D trajectory?". So, based on the answer, the part of code after the question is exectuded or not.
Is it possible? If yes, how?
Thanks in advance!

Respuesta aceptada

Matt J
Matt J el 20 de Jun. de 2021
Editada: Matt J el 20 de Jun. de 2021
For example,
if inputdlg('Proceed? [Y/N]')=="N"
break
end
There is also uiconfirm,

Más respuestas (0)

Categorías

Más información sobre MATLAB en Help Center y File Exchange.

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by