Calling one method from another method
Ältere Kommentare anzeigen
Hello,
Two classes:
classdef first < handle
methods
function hello(obj)
disp('hello ok')
obj_second.bye
end
end
end
and
classdef second < handle
methods
function bye(obj)
disp('bye ok')
end
end
end
I'd like to be able to call obj_second.bye from obj_first.
Can you please help me?
Thank you very much
1 Kommentar
Guillaume
am 17 Mär. 2016
I don't understand what you're trying to achieve here. What is obj_second (other than an object of class second)? Where does it come from? how does the class first know about it?
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Function Handles finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!