Why am I unable to consistently use Ctrl+C to break out of an operation in MATLAB 6.0 (R12) and later versions?
Date Last Modified: Friday, June 26, 2009
| Solution ID: |
|
1-188VX |
| Product: |
|
MATLAB |
| Platform: |
|
All Platforms |
| Operating System: |
|
All OS |
Subject:
Why am I unable to consistently use Ctrl+C to break out of an operation in MATLAB 6.0 (R12) and later versions?
Problem Description:
It appears that Ctrl+C interrupts are not consistently captured across versions of MATLAB on different platforms.
Solution:
The level of response from MATLAB when using Ctrl+C to break out of an operation depends on the operating system. Since UNIX uses asynchronous signals, it is possible to break out of any operation and into the signal handler at any time. However, Windows machines do not operate this way. MATLAB code must poll the operating system to determine whether Ctrl+C has been attempted. Since not all code that is being executed is MATLAB code, there are times when we have no reasonable way to break out (e.g. when running MEX-files, or when doing heavy mathematical computations in the LAPACK libraries).
If you think that you are experiencing a Ctrl+C issue please send the following information as part of a service request to support@mathworks.com:
1. The output of "ver" from the MATLAB prompt. 2. The exact operating system and platform you are running on. 3. A detailed description of the problem. 4. A detailed explanation of how to reproduce the problem. This step is extremely important. We will need you to reproduce the problem from the point of launching MATLAB. Be sure to provide any user-written functions, models, and data files that may be needed to reproduce the problem, and the exact steps to run the code, beginning with launching MATLAB.
NOTE: The following are known Ctrl+C behaviors in specific versions of MATLAB for Windows.
In general, when you use Ctrl+C, MATLAB should break execution at the next call to DRAWNOW, PAUSE, GETFRAME, or with a return to the command prompt.
1. In MATLAB 6.0 (R12) it takes a little while to break out of an operation during graphics animation routines. Continue to hold Ctrl+C.
2. MATLAB 6.1 (R12.1) will not break out of a graphics routine at all unless the command window is the active window. Therefore, you will need to click on the command window before trying to use Ctrl+C. If your graphics animation loop brings your figure to the foreground within the loop, then it can be quite difficult to break this routine. Note that when you click on the command window to make it active, you do not need to wait for the command window to become active before pressing Control-C. However, if the figure is made active again in the code, then it will be difficult to execute a Ctrl+C between graphics updates.
|
|
|
|