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

1 次查看(过去 30 天)
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 个评论
Adam
Adam 2017-2-21
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.

请先登录,再进行评论。

回答(1 个)

Jan
Jan 2017-2-21
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 个评论
Jan
Jan 2017-2-21
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.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Annotations 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by