I'm getting >> Reference to non-existent field 'speak'. error. Please help.
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Ishan Gawai
le 8 Mar 2021
Commenté : Ishan Gawai
le 9 Mar 2021
Hi, I'm a beginner in matlab and using OO programming for first time. Whenever I call function speak from class I get reference to non-existent field 'speak ' error.
classdef dog
properties
name
breed
colour
end
methods
function speak(obj)
disp(obj.name + "says Hi!!!")
end
end
end
0 commentaires
Réponse acceptée
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Software Development Tools 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!