Syntax
fact=isSGfigureStop
Output Parameter
Copyright 2020-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth
Algorithm (Workflow)
This function, isSGfigureStop
, is designed to manage the stopping of figure animations in MATLAB, which cannot be interrupted using the standard ctrl-c
command. It uses a persistent variable to track the stop status.
Input Parameters
varargin
: A variable-length input argument list. If provided and not empty, the first element is used to set the persistent variable SGfigureStop
.
Output
fact
: A boolean value that is true
if the animation has been stopped, otherwise it reflects the current state of SGfigureStop
.
Algorithm Steps
- The function uses a persistent variable
SGfigureStop
to maintain the stop status across multiple calls.
- If there are input arguments and the first argument is not empty, it sets
SGfigureStop
to the value of this argument.
- The function returns the current value of
SGfigureStop
as fact
.
- If there are no input arguments and
SGfigureStop
is true
, it indicates that the execution has been stopped by the user. A message is printed to inform the user to close the current figure manually or to push the red STOP button in the editor window.
Algorithm explaination created using ChatGPT on 2025-08-18 23:28. (Please note: No guarantee for the correctness of this explanation)
Last html export of this page out of FM database by TL: 2025-09-21