Can't zoom in using mouse and figure toolbar (It does not crash though!)

3 visualizaciones (últimos 30 días)
Milad Zarei
Milad Zarei el 21 de Feb. de 2017
Comentada: Jan el 21 de Feb. de 2017
Hi all. I am trying to print out something and then zoom in on the graph. But when I hit the magnifier bottom, it selects the magnifier, but the magnifier does not work! (Fig. 1)
Also, when I try to use anything else (e.g. zooming out), it would not work either! (Fig. 2).
This is a piece of code that I am using, and it pauses the code in order to get inputs from the user (I thought it might have caused the problem):
Left = randn(10,1);
figure(1)
plot(Left);
prompt0 = Enter the number:
prompt1 = Enter another number:
kk = input(prompt0);
for ii = 1:kk
LeftHS(ii,:) = input(prompt1);
end
Do you know how I can get those toolbar features working?
Thanks.
  1 comentario
Adam
Adam el 21 de Feb. de 2017
Does it work when it isn't waiting for user input? Things that are waiting for user input have a habit of stopping other functionality until they get the user input and can then carry on.

Iniciar sesión para comentar.

Respuestas (1)

Jan
Jan el 21 de Feb. de 2017
The problem might be concealed in the statement: "I am trying to print out something". What does this exactly mean? Does the toolbar work before this "trying"?
When you assume, that it might be caused by the input code, check this by using:
LeftHS = rand(10, 5); % Or whatever
  2 comentarios
Milad Zarei
Milad Zarei el 21 de Feb. de 2017
Thanks for pointing it out. I edited the question. But this does not help!
Jan
Jan el 21 de Feb. de 2017
Sorry, Milad, I still do not understand, what you are asking for. Do you mean, that the figure toolbad is not working while Matlab waits for an input in the command window? If so, create an inputdlg instead, which 1. looks nicer and 2. does not block the processing queue.

Iniciar sesión para comentar.

Categorías

Más información sobre Data Exploration en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by