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

2 次查看(过去 30 天)
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!

采纳的回答

Matt J
Matt J 2021-6-20
编辑:Matt J 2021-6-20
For example,
if inputdlg('Proceed? [Y/N]')=="N"
break
end
There is also uiconfirm,

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

产品


版本

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by