My function does not execute to the end but i have no errors!!

3 次查看(过去 30 天)
When i call this function, it's called correctly but it's not executed to the end. I have no errors in Matlab.
function output_txt = GraphCursorCall(obj, event_obj, Nodes)
% Display data cursor position in a data tip
% obj Currently not used
% event_obj Handle to event object
% output_txt Data tip text, returned as a character vector or a cell array of character vectors
h = event_obj.Target;
pos = event_obj.Position;
ind = find(h.XData == pos(1) & h.YData == pos(2), 1); %until here, EXECUTED
output_txt = {['Node ', num2str(ind)], ['OUTD: ', num2str(Nodes.OUT(ind))], ['IND: ', num2str(Nodes.IN(ind))]}; %NOT EXECUTED
disp("FINE"); %NOT EXECUTED
end
  1 个评论
Rik
Rik 2019-5-3
This time I edited your question for you. Next time, please use the tools explained on this page to make your question more readable.
Have you tried putting a break point at the first line of code of this function to see if it runs in the first place?

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Graphics Objects 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by