How to get point value in app designer plots?
Show older comments
Hello everyone.
Is there a way to get a point value from a plot using the mouse cursor in appdesigner? This is my code in a script file and it works pretty good but I can't translate it into the AppDesigner world.
% Other code lines
if app.qq==1
i=1;
dcm_obj = datacursormode;
set(dcm_obj,'DisplayStyle','window','SnapToDataVertex','on','Enable','on')
waitforbuttonpress
c_info{i} = getCursorInfo(dcm_obj); %#ok
Freq_line=c_info{1,i}.Position(1);
idx=find(app.H.f==Freq_line);
app.qq=2;
q=1; %#ok
end
% Other code lines
I gave a look online but it seems that both datacursormode and waitforbuttonpress don't works in AppDesigner. I didn't find any answer yet and I hope someone could help me.
Thank you in advance for your reply.
Accepted Answer
More Answers (0)
Categories
Find more on Develop Apps Using App Designer 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!