wait(ROI) blocks execution of the MATLAB® command line until the operation on the ROI object ROI
completes. Indicate completion by double-clicking the ROI object.
Create an ROI on the axes. Click and drag the mouse to create the rectangular ROI.
roi = drawrectangle;
At the command line, view the value of the Position property of the ROI.
roi.Position
ans = 1×4
57.0000 146.0000 141.0000 87.0000
Call the wait method of the ROI. This blocks the command line until an operation on the ROI completes. For example, you can move the ROI, reshape it, or rotate it (if you have enabled rotation). For this example, position the cursor inside the ROI, click and drag the ROI over the image to a new location. To indicate completeness, double-click the ROI.
wait(roi)
Back at the command line, check the value of the ROI's Position property. You can see that the values have changed to represent the new position.
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window.
Web browsers do not support MATLAB commands.
Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.