MATLAB Answers

add GUI dialogue box when event happens

1 view (last 30 days)
Tiberius on 11 Sep 2014
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".


Geoff Hayes
Geoff Hayes on 11 Sep 2014
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
Salaheddin Hosseinzadeh on 11 Sep 2014
Hi Geoff,
Thanks for your answer.
You should have posted this as an answer though!

Sign in to comment.

Answers (0)


Translated by