MATLAB Answers

COM object event with input parameter

1 view (last 30 days)
wonderkismet on 16 Sep 2019
Edited: wonderkismet on 16 Sep 2019
The ophir powermeter's Event has input parameters to determind which device fires the event.
However it seem Matlab does not support event with input parameters? not like C++
For example:
C = actxcontrol('mwsamp.mwsampctrl.2',[0 0 200 200]);
registerevent(C,{'Click' @myclick})
It seem Matlab only support event name (char) vs event handler (func) pairs
I know how to pass parameter to event handler, the problem is , who to pass parameter to the event itself.

Answers (0)


Community Treasure Hunt

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

Start Hunting!