フィルターのクリア

ginput doe not work anymore

7 ビュー (過去 30 日間)
Don
Don 2016 年 12 月 7 日
コメント済み: Don 2016 年 12 月 8 日
[TrajX, TrajY] = ginput;
this has worked great but now does not work at all. I click mouse to select a region -- with simultaneous press of shift, or without -- and I get nothing. What is the problem? I have checked the Matlab help and documentation, but no clue how to use it

採用された回答

Steven Lord
Steven Lord 2016 年 12 月 7 日
From the documentation: "[x,y] = ginput gathers an unlimited number of points until you press the Return key."
Did you press the Return key after clicking in the axes one or more times? The ginput function won't return, and won't assign any values to the outputs with which you called it, until you do.
  1 件のコメント
Don
Don 2016 年 12 月 8 日
The solution is this: click once to begin the selection, click again to end selection, then return. Previous versions required: (1) shift + click-and-hold-down to select a region, then and later versions required (2) just click-and-hold to select (no shift key). Current versions is as above. NONE of the help files tell how to do this. Thanks for your help

サインインしてコメントする。

その他の回答 (1 件)

Image Analyst
Image Analyst 2016 年 12 月 7 日
If you want to return after clicking a single point, then try this:
again = true;
while again
[TrajX, TrajY] = ginput(1);
promptMessage = sprintf('Do you want to accept this point and Continue\nor re-do it and click the point again?');
titleBarCaption = 'Continue?';
buttonText = questdlg(promptMessage, titleBarCaption, 'Continue', 'Re-do', 'Continue');
if strcmpi(buttonText, 'Continue')
again = false;
end
end

カテゴリ

Help Center および File ExchangeVisual Exploration についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by