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

3 ビュー (過去 30 日間)
Milad Zarei
Milad Zarei 2017 年 2 月 21 日
コメント済み: Jan 2017 年 2 月 21 日
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 件のコメント
Milad Zarei
Milad Zarei 2017 年 2 月 21 日
Thanks for pointing it out. I edited the question. But this does not help!
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 Center および File ExchangeData Exploration についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by