Strange behaviour with impoint()

1 次查看(过去 30 天)
Alexis
Alexis 2018-6-8
编辑: Alexis 2018-6-8
I need to manually mark data points that weren't detected by my algorithm. So I have been trying to use impoint() and when it works, it's great.
The problem is that, occasionally, when I click anywhere in the plot, the marker jumps a centimetre below to where I have clicked. And it continues to jump around everywhere you click. You can never actually double-click the point to confirm, because it just jumps away from your cursor like a game of tag.
This occurs very inconsistently and I can't figure out what part of the script is relevant to the error, but here's the part immediately surrounding impoint().
plot (breath)
hold on
for i = 1:numAcc
plot(inhale{i,2},breath(round(inhale{i,2})),'rx',inhale{i,1},breath(round(inhale{i,1})),'gx')
end
set(gcf, 'Position', [0, 250, width, 600])
corInhaleBegin = impoint(gca,[]);
getPosition(corInhaleBegin);
accepted_pos1 = wait(corInhaleBegin);
resume(corInhaleBegin);
correctedBreath(corCount,:) = {accepted_pos1};
close
Edit: When I comment this line
set(gcf, 'Position', [0, 250, width, 600])
the problem goes away. Does anyone know why this is? It saves me a lot of clicking and dragging if I can have the window appear at this size so I regret having to comment it.

回答(0 个)

类别

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

产品


版本

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by