Path: news.mathworks.com!newsfeed-00.mathworks.com!nlpi057.nbdc.sbc.com!prodigy.net!news.glorb.com!news.litech.org!News.Dal.Ca!newsflash.concordia.ca!canopus.cc.umanitoba.ca!not-for-mail
From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)
Newsgroups: comp.soft-sys.matlab
Subject: Re: Send an interrupt from a GUI
Date: Fri, 11 Jul 2008 17:04:46 +0000 (UTC)
Organization: National Research Council Canada - Conseil national de rechereches Canada
Lines: 20
Message-ID: <g583re$be$1@canopus.cc.umanitoba.ca>
References: <g581oe$ic8$1@fred.mathworks.com>
NNTP-Posting-Host: origin.ibd.nrc.ca
X-Trace: canopus.cc.umanitoba.ca 1215795886 366 192.70.172.160 (11 Jul 2008 17:04:46 GMT)
X-Complaints-To: abuse@cc.umanitoba.ca
NNTP-Posting-Date: Fri, 11 Jul 2008 17:04:46 +0000 (UTC)
Originator: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)
Xref: news.mathworks.com comp.soft-sys.matlab:478880



In article <g581oe$ic8$1@fred.mathworks.com>,
David Doria <daviddoria@gmail.com> wrote:
>I have a GUI with 2 buttons, "GO" and "STOP"

>When I press "GO", a function is called that takes a long
>time to run.  I would like to make it so when I press "STOP"
>the execution is terminated (the same as pressing ctrl+c in
>the command window).  How do you do this?

You cannot do that: there is no programmed equivilent to
pressing control-c.

See also the recent thread "COMMAND WINDOW INTERRUPT" of May 27th,

http://groups.google.ca/group/comp.soft-sys.matlab/browse_frm/thread/363221a0a5e915d/858f4ca6d85566ff
-- 
  "For men are prone to go it blind along the calf-paths of the
  mind To do what other men have done. They follow in the beaten
  track, and out and in, and forth and back, and still their
  devious course pursue, to keep the path that others do." -- Sam Walter Foss