Figure unresponsive while waiting for input

4 visualizaciones (últimos 30 días)
Yonni f
Yonni f el 20 de Dic. de 2021
Comentada: Yonni f el 20 de Dic. de 2021
Hi,
I have code that requests user input based on a figure that is shown. Unfortunately, the figure is unresponsive while waiting for the input. This shows up in two ways. (1) The figure does not resize when I resize the window and (2) a scroll function that I was programmed for the figure does not work. Once the code is cancelled, it works fine.
Additional information is that I inherited this code for someone who was using an older MATLAB verison. I am on 2016a.
Thanks
  2 comentarios
Rik
Rik el 20 de Dic. de 2021
How exactly is the input requested?
Yonni f
Yonni f el 20 de Dic. de 2021
x = input('y?');

Iniciar sesión para comentar.

Respuesta aceptada

Image Analyst
Image Analyst el 20 de Dic. de 2021
Yes, that's the way it's designed to work. If you tell it to get your input, it waits to get your input and pays attention ONLY to the command line until you enter something. If you want to make adjustments to the GUI, you'd need to make those in advance of calling input().
  6 comentarios
Walter Roberson
Walter Roberson el 20 de Dic. de 2021
Are you using traditional figures (such as with GUIDE), or are you using App Designer?
When I test with inputdlg() and traditional figures, resizing does happen.
Yonni f
Yonni f el 20 de Dic. de 2021
Just normal images, not App Designer. Not sure why it's not working with mine. Maybe a difference in version.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Creating, Deleting, and Querying Graphics Objects en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2016a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by