How to end ginput?

42 views (last 30 days)
Sandy
Sandy on 31 May 2016
Commented: Adam Danz on 25 Sep 2020
I have a code that uses ginput to gather data. I keep getting this message when I am done gathering data and close the figure.
Error using ginput (line 81)
Interrupted by figure deletion
Error in plotdecon5b (line 52)
[x,k]=ginput;
Is there a way to tell ginput I am done selecting data and not have to close the figure?

Accepted Answer

Jos (10584)
Jos (10584) on 31 May 2016
try, xy = ginput, catch end
  3 Comments
Jos (10584)
Jos (10584) on 1 Jun 2016
?? On my matlab version ginput is exited by pressing enter. I think the code you are using is flawed ...
Adam Danz
Adam Danz on 25 Sep 2020
Jos is correct and it's clearly stated in the documentation.

Sign in to comment.

More Answers (0)

Categories

Find more on Data Exploration in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!