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

2 ビュー (過去 30 日間)
Giuseppe
Giuseppe 2021 年 6 月 20 日
コメント済み: Giuseppe 2021 年 6 月 20 日
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,
  1 件のコメント
Giuseppe
Giuseppe 2021 年 6 月 20 日
That's perfect but "break" must be removed.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by