Effacer les filtres
Effacer les filtres

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

3 vues (au cours des 30 derniers jours)
Vincenzo Bianco
Vincenzo Bianco le 3 Mai 2019
Commenté : Rik le 3 Mai 2019
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 commentaire
Rik
Rik le 3 Mai 2019
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?

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Graphics Objects dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by