Main Content

resume

(Not recommended) Resume execution of MATLAB command line

resume is not recommended. The new ROI objects do not support a resume object function. For more information, see Compatibility Considerations.

Syntax

Description

resume(h) resumes execution of the MATLAB® command line.

The resume function is useful when you need to exit wait from a callback function. When called after a call to wait, resume causes wait to return the ROI position or coordinates of vertices.

Input Arguments

collapse all

ROI object, specified as an imellipse, imline, impoint, impoly, or imrect object.

Version History

Introduced in R2008a

collapse all

R2018b: resume is not recommended

Starting in R2018b, a new set of ROI objects replaces the existing set of ROI objects. The new objects provide more functional capabilities, such as face color transparency. The new classes also support events that you can use to respond to changes in your ROI such as moving or being clicked. Although there are no plans to remove the old ROI objects at this time, switch to the new ROIs to take advantage of the additional capabilities and flexibility. For more information on creating ROIs using the new ROI functions, see Create ROI Shapes.

The new ROI objects do not support the resume object function. The wait object function associated with the new ROIs no longer returns position information, so there is no need for a resume function to trigger this return.

Update Code

Update all instances of resume.

Discouraged UsageRecommended Replacement
imshow('cameraman.tif');
h = imrect;
pos = wait(h);
% Call resume to return control
% to the command line
resume(h)

With the new ROIs, there is no equivalent to the resume object function. To migrate this code, remove the wait return value and delete calls to resume in callback functions.