How can I implement a function that does the equivalent of Ctrl-C in Matlab R2014a?

i would like to use pushbutton in MATLAB GUI R2014a which does same functionality as CTRL-C when clicked...

Answers (1)

As far as I know, that's not possible with the current single-threaded architecture of matlab. If matlab is busy, the UI will not respond.
With any program (not just matlab), the only way for the UI to be responsive when something is being processed, is for the processing to occur in a background thread. So, to do that in matlab you'd need the parallel processing toolbox and do your processing using worker threads. In this case, there's nothing to ctrl-c.

Categories

Asked:

on 28 Jan 2015

Answered:

on 28 Jan 2015

Community Treasure Hunt

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

Start Hunting!