Filter löschen
Filter löschen

How to create a callback function in MATTLAB that calls a routine everytime it receives a data frame from an external sensor ?

2 Ansichten (letzte 30 Tage)
Dear all,
I am attempting to write a callback function in MATLAB; a routine that calls a function every time a condition is satisfied, i.e. an event driven routine running in real-time. The condition, in my case, is receiving a meaningful frame from a sensor, i.e. Leap Motion controller.
Matlab has built-in callback functions that are associated with GUIs, e.g. 'WindowButtonMotionFcn' that can be used in the format "set (gcf, 'WindowButtonMotionFcn', @mouseMove)". My objective is to have an event driven routine similar to 'WindowButtonMotionFcn', but the event that calls my function, e.g. @FrameArrival, is the arrival of a data frame from my sensor rather than moving the mouse cursor over the current figure !
Could I possibly write such a call back function that is not attached to a graphic object or GUI ?
Regards,
Bashar

Antworten (0)

Kategorien

Mehr zu Specifying Target for Graphics Output finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by