Info

此问题已关闭。 请重新打开它进行编辑或回答。

add GUI dialogue box when event happens

1 次查看(过去 30 天)
Tiberius
Tiberius 2014-9-11
关闭: MATLAB Answer Bot 2021-8-20
Hi. I have a program (lots of functions) which creates an interface and I want to add a dialogue box saying "a router was found" every time the signal level reaches a certain threshold. Also, the signal value is retrieved in real time. My other question is : can I simulate a signal so that I can test the newly added "a router was found" dialogue box.
I attach my code in the hope that anyone can help and apologize that it's in romanian. The graph reads : "power spectral density", and the others are "energy detection parameters" and "data acquisition parameters".
  2 个评论
Geoff Hayes
Geoff Hayes 2014-9-11
Tiberius - consider using a msgbox such as
msgbox('A router was found','Information')
whenever a signal reaches a certain threshold. (This will be a non-modal dialog; see the link for more details.)
You've only attached the m-file, so we can't run trough the GUI (would need the fig file for that) but you should be able to determine where in the code to add the message box logic.
Salaheddin Hosseinzadeh
Hi Geoff,
Thanks for your answer.
You should have posted this as an answer though!

回答(0 个)

标签

Community Treasure Hunt

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

Start Hunting!

Translated by