Borrar filtros
Borrar filtros

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

2 visualizaciones (últimos 30 días)
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

Respuestas (0)

Categorías

Más información sobre Specifying Target for Graphics Output en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by