필터 지우기
필터 지우기

ginput breaks matlab live editor

조회 수: 2 (최근 30일)
KB
KB 2020년 3월 25일
댓글: KB 2020년 3월 26일
Hi I have used ginput before, but now I am trying to run it in Matlab live editor and it seems to freeze the live editor, which simply keeps a state of 'busy' with no cross hairs and no resolution. Can anyone advise how to get ginput functionality in the live editor?
  댓글 수: 2
Adam Danz
Adam Danz 2020년 3월 25일
The following works for me when I run it from Live Editor, though it requires using an external figure since ginput() is not (yet) supported for UIFigures (as of r2019b).
fh = figure();
set(fh, 'Visible','on')
ax = axes(fh);
plot(ax, rand(1,10), rand(1,10), 'o')
xy = ginput(1);
title(ax,sprintf('(%.3f, %.3f)', xy(1),xy(2)))
KB
KB 2020년 3월 26일
Hi Adam,
The code above didn't work for me on r2019a, however, I have know upgraded to r2020a and the above runs. Thanks for such a speedy and helpful response!

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Visual Exploration에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by